diff build_nightly @ 1252:8e3adc6264d3

Don't depend on USER being set in build_nightly as it does not seem to work when build job is run from cron
author Michael Pavone <pavone@retrodev.com>
date Mon, 27 Feb 2017 00:38:53 -0800
parents c63516b6824a
children 866577a220e6
line wrap: on
line diff
--- a/build_nightly	Mon Feb 27 00:28:05 2017 -0800
+++ b/build_nightly	Mon Feb 27 00:38:53 2017 -0800
@@ -3,8 +3,9 @@
 set -e
 
 build_user=$1
-if [ $USER != $build_user ]; then
-	su $build_user -c "$0 $@";
+needsu=$2
+if [ "$needsu" = needsu ]; then
+	su $build_user -c "$0 $1";
 	exit
 fi