use -C for make instead of changing current directory
[fbsd-stable-mgmt.git] / update_stage0.sh
index 40bb517f6884bca624e0bdd7c02186be73aa0c97..31edbce9a77de1551d279bd30b630334ee1c3a33 100755 (executable)
@@ -39,6 +39,8 @@ parse() {
 jarg=`sysctl -n hw.ncpu`
 
 
+usrsrc=${USRSRC:-/usr/src}
+
 if [ $? -ne 0 ] 
 then 
        usage 
@@ -48,7 +50,7 @@ fi
 
 if [ ${UPDATE:=-0} -eq 1 ]; then 
        echo "updating ..." 
-       svn update /usr/src
+       svnlite update ${usrsrc}
        [ ${?} == 1 ] && exit 1
 fi
 
@@ -59,7 +61,6 @@ if [ ${CLEANING:=-0} -eq 1 ]; then
 fi
 
 echo building process on ${jarg} jobs
-cd /usr/src && make -j${jarg} buildworld && make -j${jarg} kernel KERNCONF=PEPINS \
+make -C ${usrsrc} -j${jarg} buildworld && make -C ${usrsrc} -j${jarg} kernel KERNCONF=PEPINS \
        && echo "Reboot the system."
 
-