check for existence before (re-)creation

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-03-10 13:40:05 +01:00
parent e48458f27f
commit 03502567e3

View file

@ -70,6 +70,8 @@ if [ -f "$__object/parameter/source" ]; then
fi
# No source? Create empty file/dir
else
# Only touch / create if it does not exist
if [ no = "$(cat "$__object/explorer/exists")" ]; then
case "$type" in
directory)
echo mkdir \"$destination\"
@ -85,6 +87,7 @@ else
;;
esac
fi
fi
if [ -f "$__object/parameter/mode" ]; then
mode="$(cat "$__object/parameters/mode")"