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
No related branches found
No related tags found
No related merge requests found
......@@ -10,8 +10,10 @@ if [ $# -gt 2 ] || [ "$1" = "--help" ]; then
exit 1
fi
current_dir=$(basename "$PWD")
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"
else
repo_name=$2
......@@ -19,12 +21,18 @@ fi
if [ -z $1 ]; then
# 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
branch_name=$1
fi
if [ -z $branch_name ]; then
printf "No branch name provided via comments.txt\n" >&2
exit 1;
fi
case ${FU_RUN:-0} in
1)
run_cmd="python3 main.py"
......@@ -46,5 +54,5 @@ if ! [ -z $FU_ANDORRA_USER ]; then
else
# run locally:
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment