diff options
author | Tobias Brox <tobias@redpill-linpro.com> | 2021-12-30 03:52:25 +0100 |
---|---|---|
committer | Tobias Brox <tobias@redpill-linpro.com> | 2021-12-30 03:52:25 +0100 |
commit | 46f66948473dc0b0ef98525e03bdf73d43992b1d (patch) | |
tree | 74e3b2302579d0e62b39b9ff53f4785ff989660d /tests/_setup_alias | |
parent | 64892380606729b022daeadd5d7b82b4795964a3 (diff) | |
download | calendar-cli-46f66948473dc0b0ef98525e03bdf73d43992b1d.zip |
working on the new kal interface
Diffstat (limited to 'tests/_setup_alias')
-rw-r--r-- | tests/_setup_alias | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/_setup_alias b/tests/_setup_alias new file mode 100644 index 0000000..45a267c --- /dev/null +++ b/tests/_setup_alias @@ -0,0 +1,18 @@ +error() { + echo "$1" + echo "sleeping 3" + sleep 3 + exit 255 +} + +[ -z "$calendar_cli" ] && [ -x ./calendar-cli.py ] && calendar_cli=./calendar-cli.py +[ -z "$calendar_cli" ] && [ -x ../calendar-cli.py ] && calendar_cli=../calendar-cli.py +[ -z "$calendar_cli" ] && error "couldn't find ./calendar_cli.py nor ../calendar_cli.py" + +calendar_cli() { + echo " $calendar_cli $@" + output=$($calendar_cli "$@") + [ -z "$output" ] || echo $output +} + +## TODO: new kal command aka cal.py
\ No newline at end of file |