Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/build-all
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2022-05-28 18:07:40 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2022-05-28 18:07:40 +0200
commit022270989c09dc1474fa771d9e65f333d16336b4 (patch)
tree137fcb164b988ff4564adc1eea2fe699590394d0 /build-all
parent60dbf10d93ad710ddf8b20f8ced19f7f54865ff2 (diff)
build-all: added -t/--test as a test mode
Diffstat (limited to 'build-all')
-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"