Skip to content

Commit

Permalink
Merge pull request #1 from WesleyCh3n/beta
Browse files Browse the repository at this point in the history
Remove unnecessary files, change `ga` to modify `score.py` for lab
  • Loading branch information
csinrn committed Sep 28, 2021
2 parents 366c4c3 + e87671f commit c5bf267
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 547 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif
@echo "Done"

install:
sudo cp ./ga /usr/bin/
sudo cp src/Dockerfile/ga /usr/bin/

uninstall:
sudo rm /usr/bin/ga
Expand Down
11 changes: 0 additions & 11 deletions answers.yml

This file was deleted.

211 changes: 0 additions & 211 deletions ga

This file was deleted.

21 changes: 10 additions & 11 deletions src/Dockerfile/ga
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ while (( "$#" )); do
FILE=$2
shift
;;
-L|--labyaml)
isLab= true
-L|--labyaml)
isLab=true
FILE=$2
shift
;;
shift
;;
-n|--name)
HWNUM=$2
shift
Expand Down Expand Up @@ -50,15 +50,14 @@ setup_color() {

get_template() {
info "autograde-Makefile"
curl -o ./autograde-Makefile -fsSL https://github.com/WesleyCh3n/NTUBME-Autograde/raw/master/template/autograde-Makefile.template
curl -sfLo ./autograde-Makefile https://github.com/WesleyCh3n/NTUBME-Autograde/raw/master/src/Makefile
info "gtest.cpp"
curl -o ./gtest.cpp -fsSL https://github.com/WesleyCh3n/NTUBME-Autograde/raw/master/template/gtest.cpp.template
curl -sfLo ./gtest.cpp https://github.com/WesleyCh3n/NTUBME-Autograde/raw/master/src/gtest.cpp
info "score.py"
curl -o ./score.py -fsSL https://github.com/WesleyCh3n/NTUBME-Autograde/raw/master/template/score.py.template
if [[ $isLab==true ]];then
curl -o ./score.py -fsSL https://github.com/WesleyCh3n/NTUBME-Autograde/raw/master/template/score_lab.py.template
else
curl -o ./score.py -fsSL https://github.com/WesleyCh3n/NTUBME-Autograde/raw/master/template/score.py.template
curl -sfLo ./score.py https://github.com/WesleyCh3n/NTUBME-Autograde/raw/master/src/score.py
if [[ $isLab == true ]];then
info "This is lab. Change total score to 100."
sed -i '/40/s//70/g' ./score.py
fi
}

Expand Down
File renamed without changes.
17 changes: 0 additions & 17 deletions template/autograde-Makefile.template

This file was deleted.

10 changes: 0 additions & 10 deletions template/gtest.cpp.template

This file was deleted.

Loading

0 comments on commit c5bf267

Please sign in to comment.