From 2836d2f4452b538e24ca6b85ee27df7bce0b69b2 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Wed, 9 Feb 2022 19:23:08 +0100 Subject: Simplified scripts build process (removed SDEPDATA). --- scripts/sdep-add | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts/sdep-add') 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 @@ #!/bin/sh -# Adds a line to SDEPDATA/once. It is possible to specify a date, which will be +# Adds a line to $sdepdata/once. It is possible to specify a date, which will be # read by date -d and prepended to the input text. # -d is a non-portable option of GNU date. On some other systems one can # accomplish the same with the -j option. @@ -8,7 +8,9 @@ # Usage: sdep-add [date] # Example: sdep-add "next monday" -file="SDEPDATA/once" +sdepdata="${XDG_DATA_HOME:-$HOME/.local}/sdep" + +file="$sdepdata/once" date="" [ -n "$1" ] && date=$(date -d "$1" +%Y-%m-%d) -- cgit v1.3