diff options
-rwxr-xr-x | build.sh | 18 | ||||
-rwxr-xr-x | tools/build_snapshots.sh | 12 | ||||
-rw-r--r-- | tools/builder_common.sh | 4 |
3 files changed, 17 insertions, 17 deletions
@@ -35,14 +35,14 @@ usage() { echo " --build-kernels - build all configured kernels" echo " --build-kernel argument - build specified kernel. Example --build-kernel KERNEL_NAME" echo " --install-extra-kernels argument - Put extra kernel(s) under /kernel image directory. Example --install-extra-kernels KERNEL_NAME_WRAP" - echo " --snapshots - Build snapshots and upload them to RSYNCIP" + echo " --snapshots - Build snapshots" echo " --poudriere-snapshots - Update poudriere packages and send them to PKG_RSYNC_HOSTNAME" echo " --setup-poudriere - Install poudriere and create necessary jails and ports tree" echo " --create-unified-patch - Create a big patch with all changes done on FreeBSD" echo " --update-poudriere-jails [-a ARCH_LIST] - Update poudriere jails using current patch versions" echo " --update-poudriere-ports [-a ARCH_LIST]- Update poudriere ports tree" echo " --update-pkg-repo [-a ARCH_LIST]- Rebuild necessary ports on poudriere and update pkg repo" - echo " --do-not-upload|-u - Do not upload pkgs or snapshots" + echo " --upload|-U - Upload pkgs and/or snapshots" echo " -V VARNAME - print value of variable VARNAME" exit 1 } @@ -54,7 +54,7 @@ unset _SKIP_REBUILD_PRESTAGE unset _USE_OLD_DATESTRING unset pfPORTTOBUILD unset IMAGETYPE -unset DO_NOT_UPLOAD +unset UPLOAD unset SNAPSHOTS unset POUDRIERE_SNAPSHOTS unset ARCH_LIST @@ -147,8 +147,8 @@ while test "$1" != ""; do --update-pkg-repo) BUILDACTION="update_pkg_repo" ;; - --do-not-upload|-u) - export DO_NOT_UPLOAD=1 + --upload|-U) + export UPLOAD=1 ;; all|none|*iso*|*ova*|*memstick*|*memstickserial*|*memstickadi*) BUILDACTION="images" @@ -243,7 +243,7 @@ case $BUILDACTION in snapshots_scp_files ;; update_pkg_repo) - if [ -z "${DO_NOT_UPLOAD}" -a ! -f /usr/local/bin/rsync ]; then + if [ -n "${UPLOAD}" -a ! -f /usr/local/bin/rsync ]; then echo "ERROR: rsync is not installed, aborting..." exit 1 fi @@ -259,7 +259,7 @@ if [ "${BUILDACTION}" != "images" ]; then exit 0 fi -if [ -n "${SNAPSHOTS}" -a -z "${DO_NOT_UPLOAD}" ]; then +if [ -n "${SNAPSHOTS}" -a -n "${UPLOAD}" ]; then _required=" \ RSYNCIP \ RSYNCUSER \ @@ -436,12 +436,12 @@ if [ -n "${_bg_pids}" ]; then fi if [ -n "${SNAPSHOTS}" ]; then - if [ "${IMAGETYPE}" = "none" -a -z "${DO_NOT_UPLOAD}" ]; then + if [ "${IMAGETYPE}" = "none" -a -n "${UPLOAD}" ]; then pkg_repo_rsync "${CORE_PKG_PATH}" elif [ "${IMAGETYPE}" != "none" ]; then snapshots_create_sha256 # SCP files to snapshot web hosting area - if [ -z "${DO_NOT_UPLOAD}" ]; then + if [ -n "${UPLOAD}" ]; then snapshots_scp_files fi fi diff --git a/tools/build_snapshots.sh b/tools/build_snapshots.sh index 693fc50..8e87751 100755 --- a/tools/build_snapshots.sh +++ b/tools/build_snapshots.sh @@ -24,7 +24,7 @@ usage() { echo " -n: Do not build images, only core pkg repo" echo " -p: Update poudriere repo" echo " -r: Do not reset local changes" - echo " -u: Do not upload snapshots" + echo " -U: Upload snapshots" } export BUILDER_TOOLS=$(realpath $(dirname ${0})) @@ -32,7 +32,7 @@ export BUILDER_ROOT=$(realpath "${BUILDER_TOOLS}/..") IMAGES="all" NO_RESET="" -NO_UPLOAD="" +UPLOAD="" LOOPED_SNAPSHOTS="" POUDRIERE_SNAPSHOTS="" @@ -52,7 +52,7 @@ while getopts lnpru opt; do NO_RESET=1 ;; u) - NO_UPLOAD="-u" + UPLOAD="-U" ;; *) usage @@ -76,7 +76,7 @@ export COUNTER=0 export _sleeping=0 snapshot_update_status() { - ${BUILDER_ROOT}/build.sh ${NO_UPLOAD} ${POUDRIERE_SNAPSHOTS} \ + ${BUILDER_ROOT}/build.sh ${UPLOAD} ${POUDRIERE_SNAPSHOTS} \ --snapshot-update-status "$*" } @@ -189,7 +189,7 @@ while [ /bin/true ]; do if [ $rc -eq 0 ]; then exec_and_update_status \ - ${BUILDER_ROOT}/build.sh ${NO_UPLOAD} \ + ${BUILDER_ROOT}/build.sh ${UPLOAD} \ --update-pkg-repo rc=$? fi @@ -200,7 +200,7 @@ while [ /bin/true ]; do if [ $rc -eq 0 ]; then exec_and_update_status \ - ${BUILDER_ROOT}/build.sh ${NO_UPLOAD} --snapshots \ + ${BUILDER_ROOT}/build.sh ${UPLOAD} --snapshots \ ${IMAGES} rc=$? fi diff --git a/tools/builder_common.sh b/tools/builder_common.sh index 1c86116..9646bc8 100644 --- a/tools/builder_common.sh +++ b/tools/builder_common.sh @@ -1309,7 +1309,7 @@ pkg_repo_rsync() { fi fi - if [ -n "${DO_NOT_UPLOAD}" ]; then + if [ -z "${UPLOAD}" ]; then return fi @@ -1688,7 +1688,7 @@ poudriere_bulk() { LOGFILE=${BUILDER_LOGS}/poudriere.log - if [ -z "${DO_NOT_UPLOAD}" -a -z "${PKG_RSYNC_HOSTNAME}" ]; then + if [ -n "${UPLOAD}" -a -z "${PKG_RSYNC_HOSTNAME}" ]; then echo ">>> ERROR: PKG_RSYNC_HOSTNAME is not set" print_error_pfS fi |