mirror of
https://github.com/gogrlx/bootstrap.grlx.dev.git
synced 2026-04-02 02:59:05 -07:00
add arch check to script
This commit is contained in:
@@ -1,6 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e -o pipefail
|
||||
curl -s https://artifacts.grlx.dev/latest/sprout > /usr/local/bin/grlx-sprout
|
||||
|
||||
arch=$(uname -m)
|
||||
|
||||
case $arch in
|
||||
"x86_64")
|
||||
machine_arch="x86_64"
|
||||
;;
|
||||
"i686"|"i386")
|
||||
machine_arch="x86"
|
||||
;;
|
||||
"aarch64"|"arm64"|"armv8")
|
||||
machine_arch="arm64"
|
||||
;;
|
||||
"armv7l")
|
||||
machine_arch="arm"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown machine architecture: $arch"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
curl -s "https://artifacts.grlx.dev/${machine_arch}/latest/sprout" > /usr/local/bin/grlx-sprout
|
||||
chmod +x /usr/local/bin/grlx-sprout
|
||||
|
||||
cat << EOF > /etc/systemd/system/grlx-sprout.service
|
||||
|
||||
@@ -1,6 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e -o pipefail
|
||||
curl -s https://artifacts.grlx.dev/v0.0.4/sprout > /usr/local/bin/grlx-sprout
|
||||
|
||||
arch=$(uname -m)
|
||||
|
||||
case $arch in
|
||||
"x86_64")
|
||||
machine_arch="x86_64"
|
||||
;;
|
||||
"i686"|"i386")
|
||||
machine_arch="x86"
|
||||
;;
|
||||
"aarch64"|"arm64"|"armv8")
|
||||
machine_arch="arm64"
|
||||
;;
|
||||
"armv7l")
|
||||
machine_arch="arm"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown machine architecture: $arch"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
curl -s "https://artifacts.grlx.dev/${machine_arch}/v0.0.4/sprout" > /usr/local/bin/grlx-sprout
|
||||
chmod +x /usr/local/bin/grlx-sprout
|
||||
|
||||
cat << EOF > /etc/systemd/system/grlx-sprout.service
|
||||
|
||||
Reference in New Issue
Block a user