summaryrefslogtreecommitdiff
path: root/update-website
diff options
context:
space:
mode:
authorSimon Doppler <dopsi@dopsi.ch>2018-05-08 14:12:14 +0200
committerSimon Doppler <dopsi@dopsi.ch>2018-05-08 14:12:14 +0200
commitfb0e1bb605062e9d15189ab8e99f86fb75d35160 (patch)
treed70105e61b3bca081c3cc24aab4afc3830bf05b1 /update-website
parented53c387983f00bcd1f55ac336b37bc3fb5bbda7 (diff)
parent4c8b552c63abc6bd419dcb79945aa230b8a9f205 (diff)
downloadreleng-fb0e1bb605062e9d15189ab8e99f86fb75d35160.tar.xz
Merge branch 'master' into set-torrent-link
Diffstat (limited to 'update-website')
-rwxr-xr-xupdate-website23
1 files changed, 23 insertions, 0 deletions
diff --git a/update-website b/update-website
index df88f5d..e7c4fc9 100755
--- a/update-website
+++ b/update-website
@@ -20,6 +20,10 @@ usage() {
>&2 echo ' Set archiso-i686 torrent link to $link.'
>&2 echo ' --torrent-seed-dual $link:'
>&2 echo ' Set archiso-dual torrent link to $link.'
+ >&2 echo ' --website-dir $dir:'
+ >&2 echo ' Set website-dir to $dir.'
+ >&2 echo ' --mirror-dir $dir:'
+ >&2 echo ' Set mirror-dir to $dir.'
[ -z "$1" ] && exit 1 || exit "$1"
}
@@ -30,6 +34,8 @@ eval set -- "$(
--long magnet-dual: \
--long torrent-seed-i686: \
--long torrent-seed-dual: \
+ --long mirror-dir: \
+ --long website-dir: \
-n "$(basename "$0")" -- "$@" || \
echo usage
)"
@@ -84,6 +90,23 @@ while [ $# -gt 0 ]; do
echo "$1" | \
tr -d '\n' > \
"${tmp_dir}/torrent-seed.dual"
+ '--mirror-dir')
+ if [ -s "${tmp_dir}/mirror_dir.set" ]; then
+ printf 'Option %s given multiple times.\n' "$1"
+ usage
+ fi
+ shift
+ mirror_dir="$1"
+ echo "$mirror_dir" > "${tmp_dir}/mirror_dir.set"
+ ;;
+ '--website-dir')
+ if [ -s "${tmp_dir}/website_dir.set" ]; then
+ printf 'Option %s given multiple times.\n' "$1"
+ usage
+ fi
+ shift
+ website_dir="$1"
+ echo "$website_dir" > "${tmp_dir}/website_dir.set"
;;
'--')
shift