autostart-manage/autoinstall/lib/common.sh

21 lines
277 B
Bash
Raw Normal View History

2024-01-09 15:48:11 +00:00
#!/usr/bin/env bash
_http_client() {
if [ -x "$(command -v curl)" ]
then
curl -fsSL "$1"
elif [ -x "$(command -v wget)" ]
then
wget -qO - "$1"
fi
}
_run_hook() {
hook=${args[--hook]:-}
if [ -n "$hook" ]
then
yellow "Running hook: $hook"
bash -c "$hook"
fi
}