forked from boru-roylu/simple_ta_helper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.sh
executable file
·40 lines (32 loc) · 903 Bytes
/
main.sh
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
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Usage:"
echo "$0 <student_list_csv> <git_pull_or_not>"
echo ""
echo "Description:"
echo " Run by student_list_csv."
echo " If you want to remove old directories and re-clone, <git_pull_or_not> is true."
exit
fi
. config
stu_git_list=$1
git_pull_bool=$2
if [ $git_pull_bool = true ]
then
if [ -f "github_account" ]
then
echo "Use github_account"
. github_account
else
echo -n "github_username:"
read github_username
echo -n "password:"
read -s github_password
fi
else
github_username="NONE"
github_password="NONE"
fi
#echo $github_username
#cat $stu_git_list | awk -F"," '{print $1, $2}'
cat $stu_git_list | awk -F"," '{ print $1,$2 }' | parallel --gnu --progress -j $threads "bash grade.sh {} $git_pull_bool ${github_username} ${github_password}"