diff --git a/README.md b/README.md index 7e12e00..fb08923 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,13 @@ Used extensivly in my Advanced C++ Courses. ### First time ``` mkdir cs101; cd cs101 -./gitclass -r hw jane cindy tao karim +./gitclass -o mhz-ninjas -ik cs101 hw jane cindy tao karim ``` * Create folder for course `cs101` * Clone repos for students: jane cindy tao karim. -* Repo name is `hw` -* full git URL is `git@${COURSE_GIT_URL}:cs101.${STUDENT}/hw.git` -* for jane it will be something like `git@$gitlab.cslab:cs101.jane/hw.git +* Repo name is `cs101` +* full git URL is `git@${COURSE_GIT_URL}:mhz-ninjas/cs101.${STUDENT}.git` +* for jane it will be something like `git@$github.com:mhz-ninjas/cs101.jane.git Alternatively, if we have no common prefix for user names: ``` diff --git a/gitclass b/gitclass index 3774aeb..dfe4415 100755 --- a/gitclass +++ b/gitclass @@ -3,7 +3,7 @@ delay(){ if [[ $1 = 0 ]]; then return - fi + fi echo -ne $2 delay_clocks=("\U1F550" "\U1F551" "\U1F552" "\U1F553" "\U1F554" "\U1F555" "\U1F556" "\U1F557" "\U1F558" "\U1F559" "\U1F55A") i=0 @@ -12,15 +12,15 @@ delay(){ ((i++)) sleep 1 echo -en "\033[2D" - + done ; } # wait between iterations # delay Time, iteration index, count of all iteratios -waitForLoop(){ - if (( $2 < $3 )); then - delay $1 "\U2002\U2002 ${LightYellow}\U00AB${Cyan}shaving${LightYellow}\U00BB ${LightWhite}\U1F410\U2002\U2002" +waitForLoop(){ + if (( $2 < $3 )); then + delay $1 "\U2002\U2002 ${LightYellow}\U00AB${Cyan}shaving${LightYellow}\U00BB ${LightWhite}\U1F410\U2002\U2002" ClearLine fi } @@ -30,8 +30,8 @@ trim() { # remove leading whitespace characters var="${var#"${var%%[![:space:]]*}"}" # remove trailing whitespace characters - var="${var%"${var##*[![:space:]]}"}" - echo "${var}" + var="${var%"${var##*[![:space:]]}"}" + echo "${var}" } function remove_local_changes() @@ -43,7 +43,7 @@ function remove_local_changes() } -function WithColor() { +function WithColor() { Normal="\e[0m" Bold="\e[1m" Black="\e[30m" @@ -106,39 +106,40 @@ ClearToEndOfScreen(){ echo -en "\e[0J" } -ClearLine(){ - echo -en "\e[2K" +ClearLine(){ + echo -en "\e[2K" } class_prefix_from_file='' load_students(){ - students_file=$( [-r ]] [-v] [-i | -t