summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2009-08-20 12:58:52 +0200
committerdakkar <dakkar@thenautilus.net>2009-08-20 12:58:52 +0200
commit3c31a5185b4513804c55443ad8f1af1744e870c6 (patch)
treebab4b136cc2801d7fa1c212158511ec56ec9f9cd
parentseparate creation of tags from creation of docs (diff)
downloadthenautilus-3c31a5185b4513804c55443ad8f1af1744e870c6.tar.gz
thenautilus-3c31a5185b4513804c55443ad8f1af1744e870c6.tar.bz2
thenautilus-3c31a5185b4513804c55443ad8f1af1744e870c6.zip
now it even works…
-rwxr-xr-xnew-doc3
-rwxr-xr-xnew-tag5
2 files changed, 6 insertions, 2 deletions
diff --git a/new-doc b/new-doc
index 74aea1e..f311766 100755
--- a/new-doc
+++ b/new-doc
@@ -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[@]}"
diff --git a/new-tag b/new-tag
index fdbf4d9..42632a0 100755
--- a/new-tag
+++ b/new-tag
@@ -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
{