kudrykv / latex-yearly-planner

Digital planner for Supernote and ReMarkable // Support Ukraine 🇺🇦 https://savelife.in.ua/en
https://github.com/kudrykv/latex-yearly-planner/discussions
MIT License
1.11k stars 162 forks source link

Incorrect flag breaks ./single.sh #107

Open MechEng70 opened 10 months ago

MechEng70 commented 10 months ago

When running ./single.sh get the error that there is an incorrect flag. When the command:

go run cmd/plannergen/plannergen.go --config "${CFG}"

is run by itself, it creates the tex files in the out directory. GO Version: go version go1.21.6 darwin/amd64


❯ echo $CFG
cfg/base.yaml,cfg/template_breadcrumb.yaml,cfg/sn_a5x.breadcrumb.default.yaml

❯ ./single.sh
Incorrect Usage. flag needs an argument: -config

NAME:
   plannergen - A new cli application

USAGE:
   plannergen [global options] command [command options] [arguments...]

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --config value
   --preview       (default: false)
   --help, -h      show help (default: false)
flag needs an argument: -config
exit status 1
jasyn commented 8 months ago

I had the same issue. I added the environment variables setting part to the ./single.sh script itself:

PLANNER_YEAR=2024
PASSES=1 
CFG="cfg/base.yaml,cfg/template_breadcrumb.yaml,cfg/sn_a5x.breadcrumb.default.yaml" 
NAME="sn_a5x.breadcrumb.default"

It worked as expected.