add arm for darwin

pull/60/head
cupcakearmy 4 years ago
parent 70eb9e441f
commit 33319a00ef
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9

@ -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"},

@ -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

@ -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()
}

Loading…
Cancel
Save