-
Notifications
You must be signed in to change notification settings - Fork 0
/
albert
executable file
·70 lines (56 loc) · 1.94 KB
/
albert
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
#!/bin/bash
MY_DIR="$(dirname "$0")"
COMMAND=$1
help(){
echo "Available operations are listed below:"
echo -e "$(tput bold)\nlist-repos$(tput sgr0)"
$MY_DIR/list-repos help
echo -e "$(tput bold)\nlist-prs$(tput sgr0)"
$MY_DIR/list-prs help
echo -e "$(tput bold)\nmerge-ami-prs$(tput sgr0)"
$MY_DIR/merge-ami-prs "help"
echo -e "$(tput bold)\nreplace-text$(tput sgr0)"
$MY_DIR/replace-text "help"
echo -e "$(tput bold)\nset-team$(tput sgr0)"
$MY_DIR/set-team "help"
echo -e "$(tput bold)\nexecute$(tput sgr0)"
$MY_DIR/execute "help"
echo -e "$(tput bold)\nclone-all-repos$(tput sgr0)"
$MY_DIR/clone-all-repos "help"
echo -e "$(tput bold)\nremove-archived-repos$(tput sgr0)"
$MY_DIR/remove-archived-repos "help"
echo -e "$(tput bold)\nmerge-prs$(tput sgr0)"
$MY_DIR/merge-prs "help"
echo -e "$(tput bold)\ncreate-label$(tput sgr0)"
$MY_DIR/create-label "help"
echo -e "$(tput bold)\nopen-pr$(tput sgr0)"
$MY_DIR/open-pr "help"
}
if [[ "$COMMAND" == "list-repos" ]]; then
$MY_DIR/list-repos "$@"
elif [[ "$COMMAND" == "merge-ami-prs" ]]; then
$MY_DIR/merge-ami-prs "$@"
elif [[ "$COMMAND" == "replace-text" ]]; then
$MY_DIR/replace-text "$@"
elif [[ "$COMMAND" == "set-team" ]]; then
$MY_DIR/set-team "$@"
elif [[ "$COMMAND" == "execute" ]]; then
$MY_DIR/execute "$@"
elif [[ "$COMMAND" == "clone-all-repos" ]]; then
$MY_DIR/clone-all-repos "$@"
elif [[ "$COMMAND" == "list-prs" ]]; then
$MY_DIR/list-prs "$@"
elif [[ "$COMMAND" == "remove-archived-repos" ]]; then
$MY_DIR/remove-archived-repos "$@"
elif [[ "$COMMAND" == "merge-prs" ]]; then
$MY_DIR/merge-prs "$@"
elif [[ "$COMMAND" == "create-label" ]]; then
$MY_DIR/create-label "$@"
elif [[ "$COMMAND" == "open-pr" ]]; then
$MY_DIR/open-pr "$@"
elif [[ "$COMMAND" == "help" ]]; then
help
else
echo -e "Valid operations:\nhelp\nlist-repos\nmerge-ami-prs\nreplace-text\nsetup\nset-team\nexecute\nclone-all-repos\nremove-archived-repos\nmerge-prs\ncreate-label\nopen-pr"
exit 1
fi