summaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rw-r--r--build.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 13ab33e..231b711 100644
--- a/build.sh
+++ b/build.sh
@@ -2,6 +2,7 @@
base=$(dirname "$0")
dir="$base/tails-download-and-verify"
mirror_dispatcher_url='https://git-tails.immerda.ch/mirror-pool-dispatcher/plain/lib/js/mirror-dispatcher.js'
+mirror_dispatcher_file="lib/mirror-dispatcher.js"
pushd "$dir" >/dev/null 2>&1 || (
echo >&2 "FATAL: Channot chdir to $dir."
exit 1
@@ -10,10 +11,10 @@ echo -n "Removing old XPIs... "
rm -f *.xpi >/dev/null && echo "done."
ver=$(egrep '"version": "[0-9]+\.[^"]+"' package.json | sed -re 's/.*"([0-9]+\.[^"]+)".*/\1/')
echo "Importing mirror-dispatcher.js library"
-curl \
+[ -f "$mirror_dispatcher_file" ] || curl \
--proto -all,https \
--tlsv1 \
- --output "lib/mirror-dispatcher.js" \
+ --output "$mirror_dispatcher_file" \
"$mirror_dispatcher_url"
echo "Building extension version $ver"
jpm xpi || exit 2