summaryrefslogtreecommitdiffstats
path: root/bin/newdoc
diff options
context:
space:
mode:
Diffstat (limited to 'bin/newdoc')
-rwxr-xr-xbin/newdoc5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/newdoc b/bin/newdoc
index 757c8214e..331bf0d02 100755
--- a/bin/newdoc
+++ b/bin/newdoc
@@ -8,6 +8,11 @@ if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
exit 1
fi
+if [ ! -e "$1" ] ; then
+ echo "!!! ${0##*/}: $1 does not exist" 1>&2
+ exit 1
+fi
+
rm -rf "${T}/${2}" && \
cp -f "${1}" "${T}/${2}" && \
exec dodoc "${T}/${2}"