mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-22 00:06:25 +00:00
add arm for darwin
This commit is contained in:
parent
70eb9e441f
commit
33319a00ef
@ -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…
Reference in New Issue
Block a user