diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2022-06-21 09:07:11 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2022-06-21 09:07:11 +0200 |
| commit | e76b410b860cefe5f0a3f6c744f317899186e96b (patch) | |
| tree | fd310dda1cfe6bc341058cf8e03f442e661aa373 /scripts/sdep-add | |
| parent | b68c98a74cec75946eb29ae814da9fe6ae732cf8 (diff) | |
| download | sdep-e76b410b860cefe5f0a3f6c744f317899186e96b.tar.gz sdep-e76b410b860cefe5f0a3f6c744f317899186e96b.zip | |
Changed folder for scripts (see README.md diff)
Diffstat (limited to '')
| -rwxr-xr-x | scripts/sdep-add | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/sdep-add b/scripts/sdep-add index b5f1a8c..bb0b2c8 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,9 +8,7 @@ | |||
| 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 | sdepdata="${XDG_DATA_HOME:-$HOME/.local/}/sdep" | 11 | file="SDEPDATA/once" |
| 12 | |||
| 13 | file="$sdepdata/once" | ||
| 14 | date="" | 12 | date="" |
| 15 | 13 | ||
| 16 | [ -n "$1" ] && date=$(date -d "$1" +%Y-%m-%d) | 14 | [ -n "$1" ] && date=$(date -d "$1" +%Y-%m-%d) |
