autoserve: make it easy to switch between devel and prod

This commit is contained in:
Adhityaa Chandrasekar 2018-12-20 04:14:22 -05:00
parent 9e3935b3b2
commit 4c0e261a8e

View File

@ -9,10 +9,12 @@ ctrl_c() {
exit exit
} }
version=devel
binary_pid= binary_pid=
if make -j$(($(nproc) + 1)); then if make $version -j$(($(nproc) + 1)); then
source devel.env source devel.env
cd build/devel cd build/$version
./$binary_name & ./$binary_name &
binary_pid=$! binary_pid=$!
cd ../../ cd ../../
@ -50,9 +52,9 @@ while true; do
wait $binary_pid wait $binary_pid
fi fi
if make -j$(($(nproc) + 1)); then if make $version -j$(($(nproc) + 1)); then
source devel.env source devel.env
cd build/devel cd build/$version
./$binary_name & ./$binary_name &
binary_pid=$! binary_pid=$!
cd ../../ cd ../../