add arm for darwin

This commit is contained in:
cupcakearmy 2021-04-26 13:15:58 +02:00
parent 70eb9e441f
commit 33319a00ef
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9
3 changed files with 7 additions and 3 deletions

View File

@ -16,7 +16,7 @@ import (
var DIR, _ = filepath.Abs("./dist")
var targets = map[string][]string{
"darwin": {"amd64"},
"darwin": {"amd64", "arm64"},
"freebsd": {"386", "amd64", "arm"},
"linux": {"386", "amd64", "arm", "arm64"},
"netbsd": {"386", "amd64"},

View File

@ -16,9 +16,11 @@ else
fi
echo $OS
NATIVE_ARCH=$(uname -m)
NATIVE_ARCH=$(uname -m | tr '[:upper:]' '[:lower:]')
if [[ $NATIVE_ARCH == *"x86_64"* ]]; then
ARCH=amd64
elif [[ $NATIVE_ARCH == *"arm64"* || $NATIVE_ARCH == *"aarch64"* ]]; then
ARCH=arm64
elif [[ $NATIVE_ARCH == *"x86"* ]]; then
ARCH=386
else

View File

@ -120,7 +120,9 @@ func upgradeRestic() error {
func Upgrade(restic bool) error {
// Upgrade restic
if restic {
InstallRestic()
if err := InstallRestic(); err != nil {
colors.Error.Println(err)
}
upgradeRestic()
}