diff options
-rwxr-xr-x | new-doc | 3 | ||||
-rwxr-xr-x | new-tag | 5 |
2 files changed, 6 insertions, 2 deletions
@@ -1,4 +1,5 @@ #!/bin/bash +here="$(cd "$(dirname "$0")";pwd)"; cd "$(dirname "$0")"/src if [[ $# -eq 0 ]]; then @@ -69,5 +70,5 @@ done ln -s "${docname//+([^\/])/..}"/../templates/du2html.xsl "$docname"/ -cd "$(dirname "$0")" +cd "$here" ./new-tag "${tags[@]}" @@ -23,7 +23,10 @@ now="$(TZ=UTC date +'%F %T')" langs="${LANGS:-en it}" for tag in "$@"; do - if [[ ! -d "$tag" ]]; then + + if [[ -d "$tag" ]]; then + >&2 echo "tag \"$tag\" already exists" + else mkdir -p "$tag" for lang in $langs; do { |