forked from lawrancej/CompilerDesign
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcollaborators.sh
More file actions
executable file
·31 lines (29 loc) · 878 Bytes
/
collaborators.sh
File metadata and controls
executable file
·31 lines (29 loc) · 878 Bytes
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
#!/bin/bash
collaborators=( $(< "AUTHORS" ) )
if [ $# = 0 ]; then
echo "Do git commands for all collaborators."
echo ""
echo "Usage: $0 COMMAND"
echo ""
echo "Where COMMAND is one the following:"
echo "setup Do git remote add for all collaborators"
echo "fetch Do git fetch for all collaborators"
echo "clean Do git remote rm for all collaborators"
echo "list Show a list of collaborators"
echo ""
echo "Example: $0 setup"
elif [ $1 = "fetch" ]; then
git fetch --all
else
for collaborator in "${collaborators[@]}"
do
if [ $1 = "setup" ]; then
git remote add $collaborator https://github.com/$collaborator/CompilerDesign.git
elif [ $1 = "clean" ]; then
git remote rm $collaborator
elif [ $1 = "list" ]; then
echo $collaborator
fi
done
git remote add upstream https://github.com/lawrancej/CompilerDesign.git
fi