AndrewMarchukov / tracker-add

Fully automated script for adding more trackers to Transmission.
267 stars 53 forks source link

date: invalid option -- 'D' #22

Open karawitan opened 2 years ago

karawitan commented 2 years ago

Hello,

thanks for sharing this very useful set of scripts. When running tracker-add-auto-router.sh, I hit the following issue:

m1:tracker-add kalou$ ./tracker-add-auto-router.sh
date: illegal option -- d
usage: date [-jnRu] [-r seconds|file] [-v[+|-]val[ymwdHMS]]
            [-I[date | hours | minutes | seconds]]
            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
m1:tracker-add kalou$

date -D is not supported by:

m1:tracker-add kalou$ /opt/homebrew/Cellar/coreutils/9.1/bin/gdate -D
/opt/homebrew/Cellar/coreutils/9.1/bin/gdate: invalid option -- 'D'
Try '/opt/homebrew/Cellar/coreutils/9.1/bin/gdate --help' for more information.
m1:tracker-add kalou$ type date
date is hashed (/bin/date)
m1:tracker-add kalou$ date -D
date: illegal option -- D
usage: date [-jnRu] [-r seconds|file] [-v[+|-]val[ymwdHMS]]
            [-I[date | hours | minutes | seconds]]
            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
AndrewMarchukov commented 2 years ago

-D option for sh, not bash -d option for bash, not sh

tracker-add-auto.sh - for bash tracker-add-auto-router.sh - for clear sh

you don't need fix anything just use right shell and right script