Skip to content

Commit

Permalink
Make sure the build type is set at the beginning
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Aug 5, 2024
1 parent 029a453 commit 39dd45e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 16 deletions.
17 changes: 15 additions & 2 deletions scripts/cvmfs/setup-nightlies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,21 @@ k4_local_repo() {
echo "Some variables may have to be updated manually to point to the local installation"
}

build_type=opt
for ((i=1; i<=$#; i++)); do
eval arg=\$$i
eval "argn=\${$((i+1))}"
case $arg in
-d)
build_type=dbg
;;
-h|--help)
usage
return 0
;;
esac
done


rel="latest-$build_type"
if [[ "$1" = "-r" && -n "$2" ]]; then
Expand All @@ -185,7 +200,6 @@ if [ $? -ne 0 ]; then
return 1
fi

build_type=opt
for ((i=1; i<=$#; i++)); do
eval arg=\$$i
eval "argn=\${$((i+1))}"
Expand Down Expand Up @@ -221,7 +235,6 @@ for ((i=1; i<=$#; i++)); do
fi
;;
-d)
build_type=dbg
;;
-r)
;;
Expand Down
29 changes: 15 additions & 14 deletions scripts/cvmfs/setup-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,21 @@ k4_local_repo() {
echo "Some variables may have to be updated manually to point to the local installation"
}

build_type=opt
for ((i=1; i<=$#; i++)); do
eval arg=\$$i
eval "argn=\${$((i+1))}"
case $arg in
-d)
build_type=dbg
;;
-h|--help)
usage
return 0
;;
esac
done


rel="latest-$build_type"
if [[ "$1" = "-r" && -n "$2" ]]; then
Expand Down Expand Up @@ -191,19 +206,6 @@ if [ $? -ne 0 ]; then
return 1
fi

for ((i=1; i<=$#; i++)); do
eval arg=\$$i
case $arg in
-h|--help)
usage
return 0
;;
*)
;;
esac
done

build_type=opt
for ((i=1; i<=$#; i++)); do
eval arg=\$$i
eval "argn=\${$((i+1))}"
Expand Down Expand Up @@ -239,7 +241,6 @@ for ((i=1; i<=$#; i++)); do
fi
;;
-d)
build_type=dbg
;;
-r)
;;
Expand Down

0 comments on commit 39dd45e

Please sign in to comment.