alphapapa / restic-runner

Configure and run Restic more easily

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue running on macOS

ivomarino opened this issue · comments

hi all, when I'm trying to run the latest version on macOS Mojave I get stuck in the following loop:

restic-runner -h
LOG (2019-03-02 13:20:04): REPO: SET: COMMAND:/Users/eim/bin/restic-runner
LOG (2019-03-02 13:20:04): REPO: SET: COMMAND:/Users/eim/bin/restic-runner
LOG (2019-03-02 13:20:04): REPO: SET: COMMAND:/Users/eim/bin/restic-runner
...

the same script works fine on Linux. Some infos:

~ zsh --version
zsh 5.3 (x86_64-apple-darwin18.0)
~ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)
Copyright (C) 2007 Free Software Foundation, Inc.

when I comment

        --)
            # Remaining args
            shift
            command="$1"
            shift
            rest=("$@")
            break
            ;;

at least I come out of the loop, any sugggestions? Thanks

fixed:

brew install gnu-getopt

then

export PATH="/usr/local/opt/gnu-getopt/bin:$HOME/...

Hi,

Thank you, I've added a note to the readme.

@alphapapa just found out that on FreeBSD 13.1 instead we need:

  • pkg install getopt-1.1.6
  • in the script modify line 508: args=$(/usr/local/bin/getopt -n "$0" -o dhv -l compare,debug,repo:,set:,snapshot:,tag:,help,added,modified,removed,verbose -- "$@") || exit 1
root@prod-3:~ # uname -a
FreeBSD prod-3 13.1-RELEASE-p2 FreeBSD 13.1-RELEASE-p2 GENERIC amd64

root@prod-storagenode-3:~ # restic-runner --help
/usr/local/bin/restic-runner [OPTIONS] ...?

https://github.com/alphapapa/restic-runner

See restic-runner's readme for more information.

Options
  -d, --debug    Print debug info
  -h, --help     I need somebody!
  -v, --verbose  Verbose output

@ivomarino Thanks. Would you please open a new issue for FreeBSD? It's easy for me to overlook new comments on closed issues.