1
0
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:
Kristoffer Minya 2018-11-09 14:25:59 +01:00 committed by GitHub
parent f4f280d78c
commit edd964b496
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

13
gogh.sh
View File

@ -201,14 +201,6 @@ capitalize() {
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() {
string=$1
string_r="${string%???}"
@ -225,10 +217,9 @@ set_gogh() {
else
if [ "$(uname)" = "Darwin" ]; then
# OSX ships with curl
# Note: sourcing directly from curl does not work
curlsource "${url}"
bash -c eval "$(curl -Lo- "${url}")"
else
bash <(wget -O - "${url}")
bash <(wget -O- "${url}")
fi
fi
}