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() {
|
source-script() {
|
||||||
local url="$1"
|
local url="$1"
|
||||||
local import="$(mktemp)"
|
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
|
if command_exists curl; then
|
||||||
curl -fsSL $url -o $import
|
curl -fsSL $url -o $import
|
||||||
elif command_exists wget; then
|
elif command_exists wget; then
|
||||||
wget -O $import $url
|
wget -o $import $url
|
||||||
else
|
else
|
||||||
echo "curl/wget is required, but missing.."
|
echo "curl/wget is required, but missing.."
|
||||||
exit 69
|
exit 69
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source "$import"
|
source "$import"
|
||||||
sleep 0.2
|
|
||||||
rm "$import"
|
echo "${BLUE}Sourcing external script:${NC} $url"
|
||||||
echo "imported $url"
|
sleep 0.1
|
||||||
|
rm -f "$import"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
__pre_stow__() {
|
__pre_stow__() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue