+if ( "`sysctl -n security.bsd.hardlink_check_uid`" == "1" ) then
+ echo "build will fail, due to hard security checks"
+ echo "sysctl security.bsd.hardlink_check_uid=0"
+ exit
+endif
+
+if ( "`sysctl -n security.bsd.hardlink_check_gid`" == "1" ) then
+ echo "build will fail, due to hard security checks"
+ echo "sysctl security.bsd.hardlink_check_gid=0"
+ exit
+endif
+
+if ( (${_current_dir} != "hardenedBSD.git")) then
+ if ((${_current_dir} != "opBSD.git")) then
+ set _current_dir = "hardenedBSD.git"
+ endif
+endif
+
+echo "build source dir: ${_current_dir}"
+sleep 1
+
+if ( ! -d $MAKEOBJDIRPREFIX ) then
+ mkdir $MAKEOBJDIRPREFIX
+endif
+
+ln -sf ${_log} ${_log_last}
+
+(cd /usr/data/source/git/opBSD/${_current_dir}; make -j$__freebsd_mk_jobs -DNO_CLEAN -DNO_ROOT KERNCONF=GENERIC buildworld buildkernel) |& tee -a ${_log}
+if ( "`sysctl -n security.bsd.hardlink_check_uid`" == "1" ) then
+ echo "build will fail, due to hard security checks"
+ echo "sysctl security.bsd.hardlink_check_uid=0"
+ exit
+endif
+
+if ( "`sysctl -n security.bsd.hardlink_check_gid`" == "1" ) then
+ echo "build will fail, due to hard security checks"
+ echo "sysctl security.bsd.hardlink_check_gid=0"
+ exit
+endif
+
+if ( (${_current_dir} != "hardenedBSD.git")) then
+ if ((${_current_dir} != "opBSD.git")) then
+ set _current_dir = "hardenedBSD.git"
+ endif
+endif
+
+echo "build source dir: ${_current_dir}"
+sleep 1
+
+if ( ! -d $MAKEOBJDIRPREFIX ) then
+ mkdir $MAKEOBJDIRPREFIX
+endif
+
+ln -sf ${_log} ${_log_last}
+
+(cd /usr/data/source/git/opBSD/${_current_dir}; make -j$__freebsd_mk_jobs -DNO_CLEAN -DNO_ROOT KERNCONF=GENERIC installworld installkernel) |& tee -a ${_log}