Simplifying regex for script download
configs/releng/airootfs/root/.automated_script.sh: Using only one regex to match http://, https:// or ftp:// endpoints.
This commit is contained in:
parent
2ce375cd01
commit
d50e57a243
@ -15,7 +15,7 @@ automated_script ()
|
|||||||
local script rt
|
local script rt
|
||||||
script="$(script_cmdline)"
|
script="$(script_cmdline)"
|
||||||
if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then
|
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
|
wget "${script}" --retry-connrefused -q -O /tmp/startup_script >/dev/null
|
||||||
rt=$?
|
rt=$?
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user