diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2022-02-09 19:23:08 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2022-02-09 19:23:08 +0100 |
| commit | 2836d2f4452b538e24ca6b85ee27df7bce0b69b2 (patch) | |
| tree | 8c45994a9ee4b80589f718c7eb0e647c6c53881f /scripts/sdep-add | |
| parent | 0bcca7b6808a02af3c4758c30eec9984d44dfac7 (diff) | |
| download | sdep-2836d2f4452b538e24ca6b85ee27df7bce0b69b2.tar.gz sdep-2836d2f4452b538e24ca6b85ee27df7bce0b69b2.zip | |
Simplified scripts build process (removed SDEPDATA).
Diffstat (limited to 'scripts/sdep-add')
| -rwxr-xr-x | scripts/sdep-add | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/sdep-add b/scripts/sdep-add index bb0b2c8..c9f4344 100755 --- a/scripts/sdep-add +++ b/scripts/sdep-add | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | # Adds a line to SDEPDATA/once. It is possible to specify a date, which will be | 3 | # Adds a line to $sdepdata/once. It is possible to specify a date, which will be |
| 4 | # read by date -d and prepended to the input text. | 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 | 5 | # -d is a non-portable option of GNU date. On some other systems one can |
| 6 | # accomplish the same with the -j option. | 6 | # accomplish the same with the -j option. |
| @@ -8,7 +8,9 @@ | |||
| 8 | # Usage: sdep-add [date] | 8 | # Usage: sdep-add [date] |
| 9 | # Example: sdep-add "next monday" | 9 | # Example: sdep-add "next monday" |
| 10 | 10 | ||
| 11 | file="SDEPDATA/once" | 11 | sdepdata="${XDG_DATA_HOME:-$HOME/.local}/sdep" |
| 12 | |||
| 13 | file="$sdepdata/once" | ||
| 12 | date="" | 14 | date="" |
| 13 | 15 | ||
| 14 | [ -n "$1" ] && date=$(date -d "$1" +%Y-%m-%d) | 16 | [ -n "$1" ] && date=$(date -d "$1" +%Y-%m-%d) |
