-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·80 lines (58 loc) · 2.09 KB
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/env bash
set -e +o pipefail
url="https://git-quick-stats.sh"
exit_with=0
b="\033[0;36m"
g="\033[0;32m"
r="\033[0;31m"
e="\033[0;90m"
x="\033[0m"
say() {
echo -e "$1"
}
show_title() {
say "
GIT-QUICK-STATS
Simple way to access various statistics in git repository.
Documentation at ${g}https://git-quick-stats.sh/#docs${x}
"
}
show_help() {
say "
Interactive usage
git-quick-stats has a built-in interactive menu that can be executed as such:
${b}git-quick-stats${x}
Or
${b}git quick-stats${x}
Non-interactive usage
For those who prefer to utilize command-line options,
git-quick-stats also has a non-interactive mode supporting both short and long options:
${b}git-quick-stats [optional-command-to-execute-directly]${x}
Or
${b}git quick-stats [optional-command-to-execute-directly]${x}
Command-line arguments:
-r, --suggest-reviewers show the best people to contact to review code
-T, --detailed-git-stats - give a detailed list of git stats
-R, --git-stats-by-branch see detailed list of git stats by branch
-d, --commits-per-day displays a list of commits per day
-m, --commits-by-month displays a list of commits per month
-w, --commits-by-weekday displays a list of commits per weekday
-o, --commits-by-hour displays a list of commits per hour
-A, --commits-by-author-by-hour displays a list of commits per hour by author
-a, --commits-per-author displays a list of commits per author
-S, --my-daily-stats see your current daily stats
-C, --contributors see a list of everyone who contributed to the repo
-b, --branch-tree show an ASCII graph of the git repo branch history
-D, --branches-by-date show branches by date
-c, --changelogs see changelogs
-L, --changelogs-by-author see changelogs by author
-j, --json-output save git log as a JSON formatted file to a specified area
-h, -?, --help display this help text in the terminal
"
}
show_title
say "Installing..."
git clone -q https://github.com/arzzen/git-quick-stats.git && cd git-quick-stats
sudo make install
say ""
exit ${exit_with};