First issue
authorDavid Marec <david.marec@davenulle.org>
Sat, 14 Oct 2017 17:11:47 +0000 (19:11 +0200)
committerDavid Marec <david.marec@davenulle.org>
Sat, 14 Oct 2017 17:11:47 +0000 (19:11 +0200)
update_stage0.sh [new file with mode: 0755]
update_stage1.sh [new file with mode: 0755]
update_stagep.sh [new file with mode: 0755]

diff --git a/update_stage0.sh b/update_stage0.sh
new file mode 100755 (executable)
index 0000000..2a299b5
--- /dev/null
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+usage() {
+       echo 'Usage: ...'
+       echo '-u        svn update'
+       echo '-j        jobs to be handled'
+       echo 'default to ' ${jarg}
+       echo '---------------------'
+}
+
+parse() {
+       RED='\033[0;31m'
+       NC='\033[0m' # No Color
+       while getopts "uj:" option 
+       do
+               case ${option} in
+                       u)
+                               update="1"
+                               ;;
+                       j)
+                               case ${OPTARG} in 
+                               (*[!0-9]*|'') 
+                                       echo -e "${RED}number expected for jobs${NC}; default value used."
+                                       ;;
+                               (*) 
+                                       jarg=${OPTARG} 
+                                       ;;
+                               esac
+                               ;;
+               esac
+       done
+}
+
+
+jarg=`sysctl -n hw.ncpu`
+
+
+if [ $? -ne 0 ] 
+then 
+       usage 
+else
+       parse ${*} 
+fi
+
+[ ${update} ] && svn update /usr/src
+
+echo Cleaning
+chflags -R noschg /usr/obj/* && rm -rf /usr/obj
+echo building process on ${jarg} jobs
+cd /usr/src && \
+make -j${jarg} buildworld && make -j${jarg} kernel KERNCONF=PEPINS && \
+echo "Reboot the system."
+
+
diff --git a/update_stage1.sh b/update_stage1.sh
new file mode 100755 (executable)
index 0000000..c4a0442
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+zfs_mount()
+{
+echo Mount zfs disk
+zfs set readonly=off llroot
+zfs mount -a
+adjkerntz -i
+/etc/rc.d/syscons start
+}
+
+
+mountro=`zfs get -H readonly llroot/ROOT/master | cut -w -f 3`
+[ ${mountro} = "on" ] && zfs_mount
+mergemaster -p
+cd /usr/src && \
+make installworld && \
+mergemaster -iF && \
+make delete-old && \
+echo "reboot to delete old libs"
+
diff --git a/update_stagep.sh b/update_stagep.sh
new file mode 100755 (executable)
index 0000000..ed637bd
--- /dev/null
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+usage() {
+       echo 'Usage: ...'
+       echo '-u        svn update'
+       echo '-j        jobs to be handled'
+       echo 'default to ' ${jarg}
+       echo '---------------------'
+}
+
+parse() {
+       RED='\033[0;31m'
+       NC='\033[0m' # No Color
+       while getopts "uj:" option 
+       do
+               case ${option} in
+                       u)
+                               update="1"
+                               ;;
+                       j)
+                               case ${OPTARG} in 
+                               (*[!0-9]*|'') 
+                                       echo -e "${RED}number expected for jobs${NC}; default value used."
+                                       ;;
+                               (*) 
+                                       jarg=${OPTARG} 
+                                       ;;
+                               esac
+                               ;;
+               esac
+       done
+}
+
+
+jarg=`sysctl -n hw.ncpu`
+
+
+if [ $? -ne 0 ] 
+then 
+       usage 
+else
+       parse ${*} 
+fi
+
+echo "Updating port Tree"
+
+[ ${update} ] && poudriere ports -p HEAD -u
+
+echo "building lapinbilly"
+
+poudriere bulk -J ${jarg} -j lapinbilly -p HEAD -f /usr/local/etc/poudriere.d/port-list
+
+echo "building llanura"
+
+poudriere bulk -J ${jarg} -j release11 -p HEAD -f /usr/local/etc/poudriere.d/port-list-llanura