Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild-all22
1 files changed, 16 insertions, 6 deletions
diff --git a/build-all b/build-all
index dd647d3..22df715 100755
--- a/build-all
+++ b/build-all
@@ -59,6 +59,7 @@ usage() {
>&2 echo "possible options:"
>&2 echo " -h|--help: show this help and exit."
>&2 echo " -f|--force: overwrite already existing artifacts (use with care!)."
+ >&2 echo " -t|--test: test mode, generate artifacts, but don't pusblish anything."
[ -z "$1" ] && exit 1 || exit "$1"
}
@@ -76,20 +77,25 @@ cleanup() {
trap cleanup EXIT
eval set -- "$(
- getopt -o hf \
+ getopt -o hft \
--long force \
+ --long test \
--long help \
-n "$(basename "$0")" -- "$@" || \
echo usage
)"
force=0
+testmode=0
while [ $# -gt 0 ]; do
case "$1" in
'--force'|'-f')
force=1
;;
+ '--test'|'-t')
+ testmode=1
+ ;;
'--help'|'-h')
usage 0
;;
@@ -202,9 +208,11 @@ else
fi
# update web page for isos and download mirrors
-echo "Updating website.."
-git -C "${WEBSITE_DIR}" reset --hard
-git -C "${WEBSITE_DIR}" pull --ff-only
+if [ $testmode = 0 ]; then
+ echo "Updating website.."
+ git -C "${WEBSITE_DIR}" reset --hard
+ git -C "${WEBSITE_DIR}" pull --ff-only
+fi
"${base_dir}/update-website" \
--website-dir="${WEBSITE_DIR}" \
--mirror-dir="${MIRROR_DIR}" \
@@ -213,8 +221,10 @@ git -C "${WEBSITE_DIR}" pull --ff-only
--update-mirrors \
--torrent-seed="https://pool.mirror.archlinux32.org/archisos/archlinux32-${DATE}-${ARCH}.iso.torrent" \
--magnet-link="${magnet_link}"
-git -C "${WEBSITE_DIR}" commit 'download/index.html' -m 'download/index.html: new isos ('"${DATE}"')'
-git -C "${WEBSITE_DIR}" push
+if [ $testmode = 0 ]; then
+ git -C "${WEBSITE_DIR}" commit 'download/index.html' -m 'download/index.html: new isos ('"${DATE}"')'
+ git -C "${WEBSITE_DIR}" push
+fi
# when did we last updates the
date +%s > "${ARCHISOS_DIR}/lastupdate"