update: submodules
This commit is contained in:
parent
647601a743
commit
4467dcd82e
1 changed files with 22 additions and 12 deletions
18
install.sh
18
install.sh
|
@ -8,19 +8,29 @@ command_exists() {
|
|||
source-script() {
|
||||
local url="$1"
|
||||
local import="$(mktemp)"
|
||||
|
||||
# ─< if $1 is a local file, source this one instead >─────────────────────────────────────
|
||||
if [ -f "$url" ]; then
|
||||
source "$url"
|
||||
sleep 0.1
|
||||
return 0
|
||||
else
|
||||
# ─< if $1 is a url, grab it and source it, also deletes afterwards >─────────────────────
|
||||
if command_exists curl; then
|
||||
curl -fsSL $url -o $import
|
||||
elif command_exists wget; then
|
||||
wget -O $import $url
|
||||
wget -o $import $url
|
||||
else
|
||||
echo "curl/wget is required, but missing.."
|
||||
exit 69
|
||||
fi
|
||||
|
||||
source "$import"
|
||||
sleep 0.2
|
||||
rm "$import"
|
||||
echo "imported $url"
|
||||
|
||||
echo "${BLUE}Sourcing external script:${NC} $url"
|
||||
sleep 0.1
|
||||
rm -f "$import"
|
||||
fi
|
||||
}
|
||||
|
||||
__pre_stow__() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue