adresses review comments

This commit is contained in:
mazzol_a
2025-05-23 11:41:56 +02:00
committed by Dhanya Thattil
parent f1fc7ae0ec
commit 5d48c3fcd8
6 changed files with 23 additions and 17 deletions

View File

@ -6,21 +6,25 @@ file="${dir}_developer"
usage="\nUsage: compileAllServers.sh [update_api(opt)]. \n\t update_api if true updates the api to version in VERSION file"
update_api=false
target=clean
update_api=true
target=version
# arguments
if [ $# -eq 1 ]; then
update_api=$1
if $update_api ; then
target=version
echo "updating api to $(cat ../VERSION)"
if not $update_api ; then
target=clean
fi
elif [ ! $# -eq 0 ]; then
echo -e "Only one optional argument allowed for update_api."
return -1
fi
if $update_api; then
echo "updating api to $(cat ../VERSION)"
fi
echo -e "Compiling $dir [$file]"
cd $dir
if make $target; then
@ -31,7 +35,6 @@ fi
mv bin/$dir bin/$file
git add -f bin/$file
cp bin/$file /tftpboot/
cd ..
echo -e "\n\n"
printf "Result:\t\t= %s\n" "${deterror}"