mirror of
https://github.com/Mayccoll/Gogh.git
synced 2023-08-10 21:12:46 +03:00
Update gogh.sh
This commit is contained in:
parent
f4f280d78c
commit
edd964b496
13
gogh.sh
13
gogh.sh
@ -201,14 +201,6 @@ capitalize() {
|
|||||||
echo "${RES_NO_TRAIL_SPACE}"
|
echo "${RES_NO_TRAIL_SPACE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
curlsource() {
|
|
||||||
local F
|
|
||||||
F=$(mktemp -t curlsource)
|
|
||||||
curl -o "$F" -s -L "$1"
|
|
||||||
source "$F"
|
|
||||||
rm -f "$F"
|
|
||||||
}
|
|
||||||
|
|
||||||
set_gogh() {
|
set_gogh() {
|
||||||
string=$1
|
string=$1
|
||||||
string_r="${string%???}"
|
string_r="${string%???}"
|
||||||
@ -225,10 +217,9 @@ set_gogh() {
|
|||||||
else
|
else
|
||||||
if [ "$(uname)" = "Darwin" ]; then
|
if [ "$(uname)" = "Darwin" ]; then
|
||||||
# OSX ships with curl
|
# OSX ships with curl
|
||||||
# Note: sourcing directly from curl does not work
|
bash -c eval "$(curl -Lo- "${url}")"
|
||||||
curlsource "${url}"
|
|
||||||
else
|
else
|
||||||
bash <(wget -O - "${url}")
|
bash <(wget -O- "${url}")
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user