garage_ynh/scripts/_common.sh

51 lines
1.1 KiB
Bash
Raw Normal View History

2017-06-05 11:04:03 +00:00
#!/bin/bash
2019-02-10 14:02:38 +00:00
#=================================================
2019-03-05 22:17:15 +00:00
# COMMON VARIABLES
2019-02-10 14:02:38 +00:00
#=================================================
2019-03-05 22:11:52 +00:00
2019-03-05 22:17:15 +00:00
#=================================================
# PERSONAL HELPERS
#=================================================
2022-07-27 08:00:43 +00:00
GARAGE_VERSION="0.7.2.1"
# inspired by restic helper
install_garage () {
architecture=$(uname -m)
arch=''
case $architecture in
i386|i686)
arch="i686"
;;
x86_64)
arch=x86_64
;;
armv*)
arch=armv6l
;;
aarch64)
arch=aarch64
;;
*)
echo
ynh_die --message="Unsupported architecture \"$architecture\""
;;
esac
wget https://garagehq.deuxfleurs.fr/_releases/v$GARAGE_VERSION/$arch-unknown-linux-musl/garage -O "$app" 2>&1 >/dev/null
chmod +x "$app"
else
ynh_die --message="\nDownloaded file does not match expected sha256 sum, aborting"
fi
}
2019-02-10 14:02:38 +00:00
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
2019-02-10 14:02:38 +00:00
#=================================================