summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlocalezmangle12
1 files changed, 9 insertions, 3 deletions
diff --git a/localezmangle b/localezmangle
index 88147a9..89d1c4f 100755
--- a/localezmangle
+++ b/localezmangle
@@ -3,7 +3,7 @@
# /usr/local/bin/localezmangle
# Copyright 2001-2002 Jonas Smedegaard <dr@jones.dk>
#
-# $Id: localezmangle,v 1.3 2002-12-03 01:11:25 jonas Exp $
+# $Id: localezmangle,v 1.4 2002-12-03 01:33:15 jonas Exp $
#
# Extract, rename and auto-mangle eZ Publish 2.2.x templates and languages
#
@@ -50,12 +50,18 @@ if [ ! -f $sedrules ]; then
fi
if [ -n "$origdir" -a -d "$origdir" ]; then
+ if [ -d "$targetdir" ]; then
+ echo "ERROR: origdir provided and targetdir exists already"
+ echo "(avoid providing origdir when updating an existing targetdir)."
+ echo "Exiting...!"
+ exit 1
+ fi
# Isolate all template files
for x in `cd $origdir && find * -type f | grep -v cache | grep "$origname"`; do mkdir -p $targetdir/`dirname $x`; cp -a $origdir/$x $targetdir/`dirname $x`; done
elif [ -d "$targetdir" ]; then
- echo "Notice: origdir not provided. Working with existing targetdir..."
+ echo "NOTICE: origdir not provided. Working with existing targetdir..."
else
- echo "Error: origdir not provided, and targetdir doesn't exist. Exiting...!"
+ echo "ERROR: origdir not provided, and targetdir doesn't exist. Exiting...!"
exit 1
fi