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