Separate creation of .orig directories from removal of files they are intended to replace.

This commit is contained in:
Nolan Darilek 2016-08-05 10:42:33 -05:00
parent 98fd721a62
commit 119c280b5a
1 changed files with 3 additions and 1 deletions

View File

@ -15,8 +15,10 @@ fi
rsync -a /opt/app/plugin/ /opt/app/dokuwiki/lib/plugins/sandstorm/
for p in /opt/app/dokuwiki/{conf,data,lib/plugins,lib/tpl}; do
if [ -e $p ]; then
if [ ! -e $p.orig ]; then
mv $p $p.orig
fi
if [ -e $p ]; then
rm -rf $p
fi
done