Adding wget support to fetch scripts
This commit is contained in:
10
thirdparty/noget.sh
vendored
10
thirdparty/noget.sh
vendored
@@ -6,8 +6,14 @@
|
||||
# Copy-paste the entire script into http://shellcheck.net to check.
|
||||
####
|
||||
|
||||
command -v curl >/dev/null 2>&1 || command -v wget > /dev/null 2>&1 || { echo >&2 "Obtaining thirdparty dependencies requires curl or wget."; exit 1; }
|
||||
|
||||
archive="$1"
|
||||
version="$2"
|
||||
curl -o "$archive.zip" -Ls https://nuget.org/api/v2/package/"$archive"/"$version"
|
||||
if command -v curl >/dev/null 2>&1; then
|
||||
curl -o "$archive.zip" -Ls https://nuget.org/api/v2/package/"$archive"/"$version"
|
||||
else
|
||||
wget -cq https://nuget.org/api/v2/package/"$archive"/"$version" -O "$archive.zip"
|
||||
fi
|
||||
mkdir -p "$archive"
|
||||
unzip -o -qq "$archive.zip" -d "$archive" && rm "$archive.zip"
|
||||
unzip -o -qq "$archive.zip" -d "$archive" && rm "$archive.zip"
|
||||
|
||||
Reference in New Issue
Block a user