21 lines
277 B
Bash
21 lines
277 B
Bash
|
#!/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
|
||
|
}
|