mirror of
https://github.com/token2/Migration-Toolset.git
synced 2026-06-22 14:42:21 -07:00
fix: download.sh not path independent
This commit is contained in:
+21
-18
@@ -2,25 +2,28 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
version="${1:-0.1.6}"
|
||||
echo "Downloading version $version"
|
||||
(
|
||||
cd "$(dirname "$0")"
|
||||
version="${1:-0.1.6}"
|
||||
echo "Downloading version $version"
|
||||
|
||||
tools=(wget tar unzip)
|
||||
tools=(wget tar unzip)
|
||||
|
||||
tools_installed="true"
|
||||
for tool in "${tools[@]}"; do
|
||||
if ! which "$tool" &> /dev/null; then
|
||||
echo "please install $tool"
|
||||
tools_installed="false"
|
||||
tools_installed="true"
|
||||
for tool in "${tools[@]}"; do
|
||||
if ! which "$tool" &> /dev/null; then
|
||||
echo "please install $tool"
|
||||
tools_installed="false"
|
||||
fi
|
||||
done
|
||||
if ! "$tools_installed"; then
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
if ! "$tools_installed"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
wget -O "qrscan-linux.tar.gz" "https://github.com/sayanarijit/qrscan/releases/download/v$version/qrscan-$version-x86_64-unknown-linux-gnu.tar.gz"
|
||||
tar --overwrite -xf "qrscan-linux.tar.gz"
|
||||
rm "qrscan-linux.tar.gz"
|
||||
wget -O "qrscan-windows.zip" "https://github.com/sayanarijit/qrscan/releases/download/v$version/qrscan-$version-x86_64-pc-windows-gnu.zip"
|
||||
unzip --overwrite -xf "qrscan-windows.zip"
|
||||
rm "qrscan-windows.zip"
|
||||
wget -O "qrscan-linux.tar.gz" "https://github.com/sayanarijit/qrscan/releases/download/v$version/qrscan-$version-x86_64-unknown-linux-gnu.tar.gz"
|
||||
tar --overwrite -xf "qrscan-linux.tar.gz"
|
||||
rm "qrscan-linux.tar.gz"
|
||||
wget -O "qrscan-windows.zip" "https://github.com/sayanarijit/qrscan/releases/download/v$version/qrscan-$version-x86_64-pc-windows-gnu.zip"
|
||||
unzip -o "qrscan-windows.zip"
|
||||
rm "qrscan-windows.zip"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user