From: Sergey Matveev Date: Thu, 21 Aug 2025 06:47:49 +0000 (+0300) Subject: Strip excess separators for convenience X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=d6492aaa190a02334e2f416e2a0068ccb109ee0617171f86fcea19e4a8bc93df;p=schwabrak.git Strip excess separators for convenience --- diff --git a/add b/add index 2f097b3..4e7d9f1 100755 --- a/add +++ b/add @@ -7,6 +7,7 @@ endash() { SROOT="$(dirname "$(realpath -- "$0")")" fn="$@" fn="$(dirname "$fn")/$(basename "$fn" | endash)" +fn=${fn#./} mkdir "$fn" echo created: $(date -u +"%Y-%m-%d %H:%M:%S") >"$fn"/meta touch "$fn"/about "$fn"/result diff --git a/metas b/metas index d90c219..27f8681 100755 --- a/metas +++ b/metas @@ -2,6 +2,7 @@ for i in $(find ${1:-.} -type d) ; do i=${i#./} + i=${i%/} [ -s $i/meta ] || continue echo id: $i echo name: $i | ${PERL:-perl} -npe 's/([^-])-([^-])/$1 $2/g ; s/-(-+)/$1/g'