diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-22 09:10:09 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-22 09:10:09 +0100 |
| commit | d506146c55ffa28ed8f5ba2d7ebd496e60e6a8d4 (patch) | |
| tree | 892cbe9b74dd914bc5b7e6148a4cfe115eaf4f76 /scripts-build/sdep-clear | |
| parent | 9902b66c098b51ac91785eb5d929a73b981ce08c (diff) | |
| download | sdep-d506146c55ffa28ed8f5ba2d7ebd496e60e6a8d4.tar.gz sdep-d506146c55ffa28ed8f5ba2d7ebd496e60e6a8d4.zip | |
added a script to check past events and notify
Diffstat (limited to 'scripts-build/sdep-clear')
| -rw-r--r-- | scripts-build/sdep-clear | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts-build/sdep-clear b/scripts-build/sdep-clear new file mode 100644 index 0000000..e30fd4d --- /dev/null +++ b/scripts-build/sdep-clear | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Removes old events from specified file (default: /home/sebastiano/.local/share/sdep/once). | ||
| 4 | |||
| 5 | # Usage: sdep-clear [file] | ||
| 6 | |||
| 7 | file="/home/sebastiano/.local/share/sdep/${1:-once}" | ||
| 8 | temp=$(mktemp) | ||
| 9 | |||
| 10 | sdep -t <"$file" >"$temp" | ||
| 11 | mv "$temp" "$file" | ||
