swich update
authorDavid Marec <DavidMarec@users.noreply.github.com>
Sun, 5 Aug 2018 08:34:27 +0000 (10:34 +0200)
committerDavid Marec <DavidMarec@users.noreply.github.com>
Sun, 5 Aug 2018 08:34:27 +0000 (10:34 +0200)
update_stage0.sh
update_stagep.sh

index 2a299b585a93910c75248a2fa02bfc549202a223..40bb517f6884bca624e0bdd7c02186be73aa0c97 100755 (executable)
@@ -2,6 +2,7 @@
 
 usage() {
        echo 'Usage: ...'
 
 usage() {
        echo 'Usage: ...'
+       echo '-c        clean obj'
        echo '-u        svn update'
        echo '-j        jobs to be handled'
        echo 'default to ' ${jarg}
        echo '-u        svn update'
        echo '-j        jobs to be handled'
        echo 'default to ' ${jarg}
@@ -11,11 +12,14 @@ usage() {
 parse() {
        RED='\033[0;31m'
        NC='\033[0m' # No Color
 parse() {
        RED='\033[0;31m'
        NC='\033[0m' # No Color
-       while getopts "uj:" option 
+       while getopts "cuj:" option 
        do
                case ${option} in
        do
                case ${option} in
+                       c)
+                               CLEANING=1
+                               ;;
                        u)
                        u)
-                               update="1"
+                               UPDATE=1
                                ;;
                        j)
                                case ${OPTARG} in 
                                ;;
                        j)
                                case ${OPTARG} in 
@@ -42,13 +46,20 @@ else
        parse ${*} 
 fi
 
        parse ${*} 
 fi
 
-[ ${update} ] && svn update /usr/src
+if [ ${UPDATE:=-0} -eq 1 ]; then 
+       echo "updating ..." 
+       svn update /usr/src
+       [ ${?} == 1 ] && exit 1
+fi
+
+
+if [ ${CLEANING:=-0} -eq 1 ]; then 
+       echo Cleaning
+       chflags -R noschg /usr/obj/* && sync && rm -rf /usr/obj && sync
+fi
 
 
-echo Cleaning
-chflags -R noschg /usr/obj/* && rm -rf /usr/obj
 echo building process on ${jarg} jobs
 echo building process on ${jarg} jobs
-cd /usr/src && \
-make -j${jarg} buildworld && make -j${jarg} kernel KERNCONF=PEPINS && \
-echo "Reboot the system."
+cd /usr/src && make -j${jarg} buildworld && make -j${jarg} kernel KERNCONF=PEPINS \
+       && echo "Reboot the system."
 
 
 
 
index ed637bdfe92aac70df3779fe60124ee44e1b44a1..2aa9dd1323bc28779110ddf7e910f2a31cf60d0c 100755 (executable)
@@ -15,7 +15,7 @@ parse() {
        do
                case ${option} in
                        u)
        do
                case ${option} in
                        u)
-                               update="1"
+                               UPDATE=1
                                ;;
                        j)
                                case ${OPTARG} in 
                                ;;
                        j)
                                case ${OPTARG} in 
@@ -42,14 +42,15 @@ else
        parse ${*} 
 fi
 
        parse ${*} 
 fi
 
-echo "Updating port Tree"
-
-[ ${update} ] && poudriere ports -p HEAD -u
+if [ ${UPDATE:=-0} -eq 1 ]; then
+       echo "Updating port Tree"
+       poudriere ports -p HEAD -u && portsnap auto
+fi
 
 echo "building lapinbilly"
 
 
 echo "building lapinbilly"
 
-poudriere bulk -J ${jarg} -j lapinbilly -p HEAD -f /usr/local/etc/poudriere.d/port-list
+poudriere bulk -J ${jarg}:2   -j lapinbilly -p HEAD -f /usr/local/etc/poudriere.d/port-list
 
 echo "building llanura"
 
 
 echo "building llanura"
 
-poudriere bulk -J ${jarg} -j release11 -p HEAD -f /usr/local/etc/poudriere.d/port-list-llanura
+poudriere bulk -J ${jarg}:2   -j release11 -p HEAD -f /usr/local/etc/poudriere.d/port-list-llanura