Improved install scripts
Due to unforeseen events :/
This commit is contained in:
parent
8ec06d3618
commit
73cbcbb3f5
9 changed files with 176 additions and 96 deletions
|
@ -50,12 +50,17 @@ urldecode() { # string
|
|||
function _machines-api {
|
||||
route=$1
|
||||
shift
|
||||
wget "$MACHINES_API/$route" --content-on-error --quiet --output-document=- "$@"
|
||||
temp=$(mktemp)
|
||||
wget "$MACHINES_API/$route" --content-on-error --quiet --output-document=$temp "$@"
|
||||
result=$?
|
||||
if [ $result != 0 ]; then
|
||||
echo "[ERROR] wget returned $result for route $route" 1>&2;
|
||||
cat $temp 1>&2;
|
||||
rm $temp
|
||||
exit 2
|
||||
fi
|
||||
cat $temp
|
||||
rm $temp
|
||||
}
|
||||
|
||||
function _machines-apiToken {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue