autoserve: make it easy to switch between devel and prod

This commit is contained in:
Adhityaa Chandrasekar
2018-12-20 04:18:43 -05:00
parent 9e3935b3b2
commit 4c0e261a8e
+6 -4
View File
@@ -9,10 +9,12 @@ ctrl_c() {
exit
}
version=devel
binary_pid=
if make -j$(($(nproc) + 1)); then
if make $version -j$(($(nproc) + 1)); then
source devel.env
cd build/devel
cd build/$version
./$binary_name &
binary_pid=$!
cd ../../
@@ -50,9 +52,9 @@ while true; do
wait $binary_pid
fi
if make -j$(($(nproc) + 1)); then
if make $version -j$(($(nproc) + 1)); then
source devel.env
cd build/devel
cd build/$version
./$binary_name &
binary_pid=$!
cd ../../