typo in BootstrapFS dependency
[build.git] / make.sh
diff --git a/make.sh b/make.sh
index d207364..1d3b2fc 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -17,7 +17,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2007 The Trustees of Princeton University
 #
-# $Id$
+# $Id: make.sh,v 1.2 2007/02/07 23:49:42 mlhuang Exp $
 #
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
@@ -31,20 +31,25 @@ rm -f $BASE/.rpmmacros $BASE/parseSpec
 make -C $BASE myplc-devel
 
 # Build everything else inside the development environment
-export PLC_ROOT=$(echo $BASE/BUILD/myplc-devel-*/myplc/devel/root)
-export PLC_DATA=$(echo $BASE/BUILD/myplc-devel-*/myplc/devel/data)
+export PLC_ROOT=$(echo $BASE/BUILD/myplc-devel-*/MyPLC/devel/root)
+export PLC_DATA=$(echo $BASE/BUILD/myplc-devel-*/MyPLC/devel/data)
 
 cleanup() {
     sudo umount $PLC_ROOT/data/fedora
     sudo umount $PLC_ROOT/data/build
-    sudo $BASE/BUILD/myplc-devel-*/myplc/host.init stop
+    sudo $BASE/BUILD/myplc-devel-*/MyPLC/host.init stop
     sudo chown -h -R $USER $PLC_DATA
 }
 
 trap "cleanup" ERR INT
 
 # Start development environment
-sudo $BASE/BUILD/myplc-devel-*/myplc/host.init start
+sudo $BASE/BUILD/myplc-devel-*/MyPLC/host.init start
+
+# Make sure "build" user has proper sudoers setup
+if [ $(sudo grep "build.*ALL=(ALL).*NOPASSWD:.*ALL" $PLC_ROOT/etc/sudoers | wc -l) -eq 0 ] ; then
+       sudo echo "build ALL=(ALL) NOPASSWD: ALL" >> $PLC_ROOT/etc/sudoers
+fi
 
 # Cross mount the current build directory to the build user home directory
 sudo mount -o bind,rw $BASE $PLC_ROOT/data/build