summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Runge <dvzrv@archlinux.org>2020-05-23 16:19:22 +0200
committerDavid Runge <dvzrv@archlinux.org>2020-05-30 19:55:03 +0200
commitd50e57a24347b2d9ac0331cd2f6a0c0b19e26089 (patch)
tree7a475bfeff8ebe589ed09f55724022f03900b8cb
parent2ce375cd011ef9f124cfc8b19c1ceb30aba4f413 (diff)
downloadarchiso32-d50e57a24347b2d9ac0331cd2f6a0c0b19e26089.tar.xz
Simplifying regex for script download
configs/releng/airootfs/root/.automated_script.sh: Using only one regex to match http://, https:// or ftp:// endpoints.
-rwxr-xr-xconfigs/releng/airootfs/root/.automated_script.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/configs/releng/airootfs/root/.automated_script.sh b/configs/releng/airootfs/root/.automated_script.sh
index 81a98a1..aaf5583 100755
--- a/configs/releng/airootfs/root/.automated_script.sh
+++ b/configs/releng/airootfs/root/.automated_script.sh
@@ -15,7 +15,7 @@ automated_script ()
local script rt
script="$(script_cmdline)"
if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then
- if [[ "${script}" =~ ^http:// || "${script}" =~ ^ftp:// ]]; then
+ if [[ "${script}" =~ ^((http|https|ftp)://) ]]; then
wget "${script}" --retry-connrefused -q -O /tmp/startup_script >/dev/null
rt=$?
else