aboutsummaryrefslogtreecommitdiff
path: root/scripts-build/sdep-add
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2022-02-09 19:13:45 +0100
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2022-02-09 19:13:45 +0100
commit0bcca7b6808a02af3c4758c30eec9984d44dfac7 (patch)
tree34d1e08904229c797e9aa07e656bbe2eb30d7f40 /scripts-build/sdep-add
parentc88e94d631b09d6f0839b4f96df2be974b23217e (diff)
downloadsdep-0bcca7b6808a02af3c4758c30eec9984d44dfac7.tar.gz
sdep-0bcca7b6808a02af3c4758c30eec9984d44dfac7.zip
Changed notification system to herbe.
Diffstat (limited to '')
-rw-r--r--scripts-build/sdep-add24
1 files changed, 0 insertions, 24 deletions
diff --git a/scripts-build/sdep-add b/scripts-build/sdep-add
deleted file mode 100644
index 7c25cdb..0000000
--- a/scripts-build/sdep-add
+++ /dev/null
@@ -1,24 +0,0 @@
1#!/bin/sh
2
3# Adds a line to /home/sebastiano/.local/share/sdep/once. It is possible to specify a date, which will be
4# read by date -d and prepended to the input text.
5# -d is a non-portable option of GNU date. On some other systems one can
6# accomplish the same with the -j option.
7
8# Usage: sdep-add [date]
9# Example: sdep-add "next monday"
10
11file="/home/sebastiano/.local/share/sdep/once"
12date=""
13
14[ -n "$1" ] && date=$(date -d "$1" +%Y-%m-%d)
15
16[ -n "$date" ] && printf "$date "
17
18read text
19
20if [ -n "$text" ]; then
21 printf "${date}\t${text}\n" >> "$file"
22else
23 echo "Event not saved"
24fi

Generated with cgit - Back to sebastiano.tronto.net