2019-03-14 06:42:12 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-04-24 06:45:25 +08:00
|
|
|
latest_release="v0.0.9"
|
2019-03-14 06:42:12 +08:00
|
|
|
|
|
|
|
case $(uname -s) in
|
|
|
|
Darwin*) os="darwin";;
|
|
|
|
Linux*) os="linux";;
|
|
|
|
*)
|
|
|
|
echo "Unsupported system type! Please build directly from source."
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case $(uname -m) in
|
|
|
|
x86_64*) arch="amd64";;
|
|
|
|
*)
|
|
|
|
echo "Unsupported processor architecture! Please build directly from source."
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo "Detected system: $os, $arch"
|
|
|
|
echo "Downloading binary for release $latest_release from GitHub..."
|
|
|
|
|
|
|
|
url="https://github.com/tjhorner/e6dl/releases/download/$latest_release/e6dl-$os-$arch"
|
|
|
|
|
|
|
|
curl $url -Lo /usr/local/bin/e6dl
|
|
|
|
chmod +x /usr/local/bin/e6dl
|
|
|
|
|
|
|
|
echo "Done! Installed to /usr/local/bin/e6dl. Simply remove this binary to uninstall."
|