Skip to content
Snippets Groups Projects
Verified Commit 18da8a85 authored by mielimom02's avatar mielimom02
Browse files

switched input file for getting branch to ${basename}_submissionText.html

parent a4233ee1
Branches
No related tags found
No related merge requests found
...@@ -10,8 +10,10 @@ if [ $# -gt 2 ] || [ "$1" = "--help" ]; then ...@@ -10,8 +10,10 @@ if [ $# -gt 2 ] || [ "$1" = "--help" ]; then
exit 1 exit 1
fi fi
current_dir=$(basename "$PWD")
if [ -z $2 ]; then if [ -z $2 ]; then
repo_name=`echo $PWD | sed 's/.*(\([a-z0-9]*\))$/\1/'` repo_name=`echo $current_dir | sed 's/.*(\([a-z0-9]*\))$/\1/'`
repo_name="$repo_name/npvp-exercises" repo_name="$repo_name/npvp-exercises"
else else
repo_name=$2 repo_name=$2
...@@ -19,12 +21,18 @@ fi ...@@ -19,12 +21,18 @@ fi
if [ -z $1 ]; then if [ -z $1 ]; then
# read branch name from comments.txt # read branch name from comments.txt
branch_name=`cat comments.txt` branch_name=`cat "${current_dir}_submissionText.html" | sed -e 's/<[^>]*>//g'` # remove all html tags.
echo $branch_name
else else
branch_name=$1 branch_name=$1
fi fi
if [ -z $branch_name ]; then
printf "No branch name provided via comments.txt\n" >&2
exit 1;
fi
case ${FU_RUN:-0} in case ${FU_RUN:-0} in
1) 1)
run_cmd="python3 main.py" run_cmd="python3 main.py"
...@@ -46,5 +54,5 @@ if ! [ -z $FU_ANDORRA_USER ]; then ...@@ -46,5 +54,5 @@ if ! [ -z $FU_ANDORRA_USER ]; then
else else
# run locally: # run locally:
git clone -b $branch_name git@git.imp.fu-berlin.de:$repo_name git-solution || exit 1 git clone -b $branch_name git@git.imp.fu-berlin.de:$repo_name git-solution || exit 1
cd git-solution && `$run_cmd`; cd .. cd git-solution && $run_cmd; cd ..
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment