summaryrefslogtreecommitdiffstats
path: root/tools/build_snapshots.sh
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-08-25 11:07:24 -0300
committerRenato Botelho <renato@netgate.com>2015-08-25 14:49:57 -0300
commit0431a7a92e6191397c1514e1265ee3028b9d4f43 (patch)
treee2fdf30b8ec8ea48f05a610e6e5b813f9bddf68e /tools/build_snapshots.sh
parent2abc3e80248a26214c17d2a62d122b0870e13204 (diff)
downloadpfsense-0431a7a92e6191397c1514e1265ee3028b9d4f43.zip
pfsense-0431a7a92e6191397c1514e1265ee3028b9d4f43.tar.gz
Leave RSYNCIP to be defined in build.conf by user, exit if it's not defined
Diffstat (limited to 'tools/build_snapshots.sh')
-rwxr-xr-xtools/build_snapshots.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/build_snapshots.sh b/tools/build_snapshots.sh
index f57cee1..e14ded5 100755
--- a/tools/build_snapshots.sh
+++ b/tools/build_snapshots.sh
@@ -56,17 +56,23 @@ done
echo ">>> Execing build.conf"
. ${BUILDER_TOOLS}/builder_defaults.sh
+if [ -z "${RSYNCIP}" -a -z "${NO_UPLOAD}" ]; then
+ echo ">>> ERROR: RSYNCIP is not defined"
+ exit 1
+fi
+
# Keeps track of how many time builder has looped
BUILDCOUNTER=0
# Local variables that are used by builder scripts
STAGINGAREA=${SCRATCHDIR}/staging
-RSYNCIP="snapshots.pfsense.org"
RSYNCKBYTELIMIT="248000"
export SNAPSHOTSLOGFILE=${SNAPSHOTSLOGFILE:-"$SCRATCHDIR/snapshots-build.log"}
export SNAPSHOTSLASTUPDATE=${SNAPSHOTSLASTUPDATE:-"$SCRATCHDIR/snapshots-lastupdate.log"}
-export MASTER_BUILDER_SSH_LOG_DEST=${MASTER_BUILDER_SSH_LOG_DEST:-snapshots@${RSYNCIP}:/usr/local/www/snapshots/logs/${PRODUCT_NAME}_${GIT_REPO_BRANCH_OR_TAG}/${TARGET}/build.log}
+if [ -n "${RSYNCIP}" -a -z "${NO_UPLOAD}" ]; then
+ export MASTER_BUILDER_SSH_LOG_DEST=${MASTER_BUILDER_SSH_LOG_DEST:-snapshots@${RSYNCIP}:/usr/local/www/snapshots/logs/${PRODUCT_NAME}_${GIT_REPO_BRANCH_OR_TAG}/${TARGET}/build.log}
+fi
# Ensure directories exist
mkdir -p $STAGINGAREA
@@ -207,10 +213,7 @@ scp_files() {
RSYNC_COPY_ARGUMENTS="-ave ssh --timeout=60 --bwlimit=${RSYNCKBYTELIMIT}" #--bwlimit=50
fi
update_status ">>> Copying files to ${RSYNCIP}"
- if [ ! -f /usr/local/bin/rsync ]; then
- update_status ">>> Could not find rsync, installing from ports..."
- (cd /usr/ports/net/rsync && make install clean)
- fi
+
rm -f $SCRATCHDIR/ssh-snapshots*
# Ensure directory(s) are available
OpenPOWER on IntegriCloud