summaryrefslogtreecommitdiff
path: root/tests/_setup_alias
diff options
context:
space:
mode:
authorTobias Brox <tobias@redpill-linpro.com>2022-01-02 01:28:53 +0100
committerTobias Brox <tobias@redpill-linpro.com>2022-01-02 01:28:53 +0100
commit1a2b0fcceb9427c652d4abfa872626684906ad5a (patch)
treec9212ef4540e9851faaf559cf6574e4b67513764 /tests/_setup_alias
parent46f66948473dc0b0ef98525e03bdf73d43992b1d (diff)
downloadcalendar-cli-1a2b0fcceb9427c652d4abfa872626684906ad5a.zip
kal: milestone, ics data can be added to the calendar
Diffstat (limited to 'tests/_setup_alias')
-rw-r--r--tests/_setup_alias16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/_setup_alias b/tests/_setup_alias
index 45a267c..0d5c302 100644
--- a/tests/_setup_alias
+++ b/tests/_setup_alias
@@ -1,3 +1,5 @@
+outfile=$(mktemp)
+
error() {
echo "$1"
echo "sleeping 3"
@@ -9,10 +11,18 @@ error() {
[ -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"
+[ -z "$kal" ] && [ -x ./cal.py ] && kal=./cal.py
+[ -z "$kal" ] && [ -x ../cal.py ] && kal=../cal.py
+[ -z "$kal" ] && error "couldn't find ./cal.py nor ../cal.py"
+
calendar_cli() {
echo " $calendar_cli $@"
- output=$($calendar_cli "$@")
- [ -z "$output" ] || echo $output
+ output=$($calendar_cli "$@" | tee $outfile)
+ [ -z "$output" ] || [ -z "$QUIET" ] || echo $output
}
-## TODO: new kal command aka cal.py \ No newline at end of file
+kal() {
+ echo " $kal $@"
+ output=$($kal "$@" | tee $outfile)
+ [ -z "$output" ] || [ -z "$QUIET" ] || echo $output
+}