|
@@ -17,7 +17,8 @@
|
|
|
# KEY_DIR = specify directory for gluon-opkg-key
|
|
|
# MAKEJOBS = number of compiler processes running in parallel (default: number of CPUs/Cores)
|
|
|
# PRIORITY = determines the number of day a rollout phase should last at most
|
|
|
-# PUBLISH = 0 (default) or 1, publish firmware at the end
|
|
|
+# UPLOAD = 0 (default) or 1, upload firmware at the end
|
|
|
+# UPDATEGIT = 0 (default) or 1, update firmware website git at the end
|
|
|
# SITE = site repository version (branch, tag or commit, default: '$BRANCH')
|
|
|
# TARGETS = a space separated list of target platforms (if unset, all platforms will be build)
|
|
|
# VERBOSE = 0 (default) or 1, call the make commands with 'V=s' to see actual errors better
|
|
@@ -29,6 +30,8 @@
|
|
|
. functions.sh
|
|
|
|
|
|
### static variables
|
|
|
+DEFAULT_BASE="v2018.1.4"
|
|
|
+DEFAULT_BRANCH="experimental"
|
|
|
MY_DIR=$(dirname $0)
|
|
|
MY_DIR=$(readlink -f "${MY_DIR}")
|
|
|
DEFAULT_KEY_DIR="${MY_DIR}/opkg-keys"
|
|
@@ -41,14 +44,14 @@ OUTPUT_DIR="${MY_DIR}/output"
|
|
|
IMAGE_DIR="${CODE_DIR}/output/images"
|
|
|
PACKAGES_DIR="${CODE_DIR}/output/packages"
|
|
|
MANIFEST_DIR="${CODE_DIR}/output/images/sysupgrade"
|
|
|
-SITE_GEN_SCRIPT="${CODE_DIR}/packages/ffho/ffho/ffho-site-generate/scripts/gen-site-conf.lua"
|
|
|
+SITE_GEN_SCRIPT="${CODE_DIR}/packages/ffho/ffho-site-generate/scripts/gen-site-conf.lua"
|
|
|
SRV_URL="firmware.in.ffho.net"
|
|
|
SRV_USER="firmware"
|
|
|
SRV_PATH="/srv/firmware"
|
|
|
|
|
|
BUILD_INFO_FILENAME="build-info.txt"
|
|
|
SITE_REPO_URL="https://git.ffho.net/freifunkhochstift/ffho-site.git"
|
|
|
-GLUON_REPO_URL="https://git.ffho.net/freifunkhochstift/gluon.git"
|
|
|
+GLUON_REPO_URL="https://github.com/freifunk-gluon/gluon.git"
|
|
|
LANG=C
|
|
|
|
|
|
pushd ${MY_DIR} > /dev/null
|
|
@@ -58,6 +61,8 @@ pushd ${MY_DIR} > /dev/null
|
|
|
[ "${BROKEN}" == "1" ] && export BROKEN || unset BROKEN
|
|
|
[ -n "${BUILD_TS}" ] || BUILD_TS=$(date +"%Y-%m-%d %H:%M:%S")
|
|
|
[ -n "${CLEAN}" ] || CLEAN="none"
|
|
|
+[ -n "${BASE}" ] || BASE=${DEFAULT_BASE}
|
|
|
+[ -n "${BRANCH}" ] || BRANCH=${DEFAULT_BRANCH}
|
|
|
|
|
|
if [ -n "${KEY_DIR}" ]; then
|
|
|
KEY_DIR=$(readlink -f "${KEY_DIR}")
|
|
@@ -68,7 +73,8 @@ fi
|
|
|
|
|
|
[ -n "${MAKEJOBS}" ] || MAKEJOBS=$(grep -c "^processor" /proc/cpuinfo)
|
|
|
[ -n "${PRIORITY}" ] || PRIORITY=0
|
|
|
-[ -n "${PUBLISH}" ] || PUBLISH=0
|
|
|
+[ -n "${UPLOAD}" ] || UPLOAD=0
|
|
|
+[ -n "${UPDATEGIT}" ] || UPDATEGIT=0
|
|
|
[ -n "${SITE}" ] || SITE=${BRANCH}
|
|
|
[ -n "${VERBOSE}" ] || VERBOSE=0
|
|
|
|
|
@@ -229,7 +235,7 @@ GLUON_PRIORITY=${PRIORITY} GLUON_BRANCH=${BRANCH} make manifest
|
|
|
|
|
|
popd > /dev/null #${CODE_DIR}
|
|
|
|
|
|
-if [ "${PUBLISH}" -eq "1" ]; then
|
|
|
+if [ "${UPLOAD}" -eq "1" ]; then
|
|
|
# copying firmware to the server
|
|
|
if [ -d "${IMAGE_DIR}" ]; then
|
|
|
progress "Copying firmware images ..."
|
|
@@ -244,7 +250,8 @@ if [ "${PUBLISH}" -eq "1" ]; then
|
|
|
rsync -rlutzc -e ssh ${PKG_SUB_DIR}/ ${SRV_USER}@${SRV_URL}:${SRV_PATH}/${VERSION}/packages
|
|
|
[ "$?" -eq "0" ] || abort "Failed to copy packages."
|
|
|
fi
|
|
|
-
|
|
|
+fi
|
|
|
+if ["${UPDATEGIT}" -eq "1"]; then
|
|
|
# copy manifest and the build info file
|
|
|
progress "Copying manifest and build info file ..."
|
|
|
pushd ${OUTPUT_DIR} > /dev/null
|