From 4c0e261a8e40e0b83e0003910bbd9fea47f5d6b0 Mon Sep 17 00:00:00 2001 From: Adhityaa Chandrasekar Date: Thu, 20 Dec 2018 04:14:22 -0500 Subject: [PATCH] autoserve: make it easy to switch between devel and prod --- scripts/autoserve | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/autoserve b/scripts/autoserve index 711e517..43834de 100755 --- a/scripts/autoserve +++ b/scripts/autoserve @@ -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 ../../