Misplaced quotes
[fbsd-stable-mgmt.git] / update_stage0.sh
index 40bb517f6884bca624e0bdd7c02186be73aa0c97..bc10a0fa116ef13eff982d95b2861122cb34cdb4 100755 (executable)
@@ -31,24 +31,21 @@ parse() {
                                        ;;
                                esac
                                ;;
+                       *)
+                               usage;;
                esac
        done
 }
 
 
 jarg=`sysctl -n hw.ncpu`
+usrsrc=${USRSRC:-/usr/src}
 
-
-if [ $? -ne 0 ] 
-then 
-       usage 
-else
-       parse ${*} 
-fi
+parse ${*} 
 
 if [ ${UPDATE:=-0} -eq 1 ]; then 
        echo "updating ..." 
-       svn update /usr/src
+       svnlite update ${usrsrc}
        [ ${?} == 1 ] && exit 1
 fi
 
@@ -59,7 +56,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."
 
-