summaryrefslogtreecommitdiffstats
path: root/tools/builder_defaults.sh
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-08-25 09:03:00 -0300
committerRenato Botelho <renato@netgate.com>2015-08-25 14:49:54 -0300
commit78b0f246af03e56a4a8c244c7f2dde574d0ee250 (patch)
tree6e3d31f2eb3a51c615274772dac4d68489ee03df /tools/builder_defaults.sh
parent4a6ea7b2745f25d92024b32571b783b13198818d (diff)
downloadpfsense-78b0f246af03e56a4a8c244c7f2dde574d0ee250.zip
pfsense-78b0f246af03e56a4a8c244c7f2dde574d0ee250.tar.gz
Adapt tools scripts for pfSense main repo (round #1):
- Move SCRATCHDIR to ./tmp and add it to .gitignore - Move logs to ./logs and add it to .gitignore - Add build.conf to .gitignore - Rename BUILDER_TOOLS to BUILDER_ROOT that makes more sense in new infrastructure - Change some (cd DIR && git) to git -C DIR - Remove BASE_DIR - Remove TOOLS_DIR - Remove update_product_repository() - Remove TOOLS_*_COMMIT variables - Rename PRODUCT_CURRENT_COMMIT and PRODUCT_LAST_COMMIT to simply CURRENT_COMMIT and LAST_COMMIT - Remove all use of GIT_REPO_DIR, GIT_REPO_UTL and GIT_REPO_TOOLS - Change clone_to_staging_area() to clone ./src instad of ./ - Detect if script was called from / or /tools and set BUILDER_ROOT and BUILDER_SCRIPTS properly - Create SCRATCHDIR if it doesn't exist
Diffstat (limited to 'tools/builder_defaults.sh')
-rw-r--r--tools/builder_defaults.sh21
1 files changed, 8 insertions, 13 deletions
diff --git a/tools/builder_defaults.sh b/tools/builder_defaults.sh
index 0b094c5..a01b31d 100644
--- a/tools/builder_defaults.sh
+++ b/tools/builder_defaults.sh
@@ -62,13 +62,13 @@ local _curdir=$(basename $(dirname ${0}))
if [ "${_curdir}" = "tools" ]; then
export BUILDER_SCRIPTS=$(realpath ${_curdir})
- export BUILDER_TOOLS=$(realpath "${_curdir}/..")
+ export BUILDER_ROOT=$(realpath "${_curdir}/..")
else
export BUILDER_SCRIPTS=$(realpath "${_curdir}/tools")
- export BUILDER_TOOLS=$(realpath "${_curdir}")
+ export BUILDER_ROOT=$(realpath "${_curdir}")
fi
-BUILD_CONF="${BUILDER_TOOLS}/build.conf"
+BUILD_CONF="${BUILDER_ROOT}/build.conf"
# Ensure file exists
if [ -f ${BUILD_CONF} ]; then
@@ -109,15 +109,15 @@ export PRODUCT_URL=${PRODUCT_VERSION:-"https://www.pfsense.org/"}
export GIT_REPO_BRANCH_OR_TAG=${GIT_REPO_BRANCH_OR_TAG:-master}
# Directory to be used for writing temporary information
-export SCRATCHDIR=${SCRATCHDIR:-/tmp}
+export SCRATCHDIR=${SCRATCHDIR:-"${BUILDER_ROOT}/tmp"}
+if [ ! -d ${SCRATCHDIR} ]; then
+ mkdir -p ${SCRATCHDIR}
+fi
# Area that the final image will appear in
export MAKEOBJDIRPREFIXFINAL=${MAKEOBJDIRPREFIXFINAL:-${SCRATCHDIR}/${PRODUCT_NAME}/}
-export TOOLS_DIR=${TOOLS_DIR:-$(basename ${BUILDER_TOOLS})}
-export BASE_DIR=${BASE_DIR:-$(realpath ${BUILDER_TOOLS}/..)}
-
-export BUILDER_LOGS=${BUILDER_LOGS:-${BUILDER_TOOLS}/logs}
+export BUILDER_LOGS=${BUILDER_LOGS:-${BUILDER_ROOT}/logs}
if [ ! -d ${BUILDER_LOGS} ]; then
mkdir -p ${BUILDER_LOGS}
fi
@@ -208,11 +208,6 @@ export NANO_BOOT0CFG="-o packet -s 1 -m 3"
# " - UNBREAK TEXTMATE FORMATTING - PLEASE LEAVE.
-# GIT repositories settings
-export GIT_REPO_URL=${GIT_REPO_URL:-"git@git.pfmechanics.com:pfsense/pfsense.git"}
-export GIT_REPO_DIR="${BASE_DIR}/${PRODUCT_NAME}_GIT_REPO"
-export GIT_REPO_TOOLS=${GIT_REPO_TOOLS:-"git@git.pfmechanics.com:pfsense/pfsense-tools.git"}
-
# Host to rsync pkg repos from poudriere
export PKG_RSYNC_HOSTNAME=${PKG_RSYNC_HOSTNAME:-"beta.pfsense.org"}
export PKG_RSYNC_USERNAME=${PKG_RSYNC_USERNAME:-"wwwsync"}
OpenPOWER on IntegriCloud