correctly check file existence

This commit is contained in:
Yves-Alexis Perez
2008-12-06 14:22:03 +00:00
parent f466256dcc
commit 773334c98c
+2 -2
View File
@@ -44,7 +44,7 @@ case "$1" in
if [ -h /etc/splashy/themes ]; then
# symlink
for FILE in ${FILES}; do
[ -f $FILE ] || break
[ -f ${THEME_FOLDER}/${FILE} ] || break
if ! same_conffile "${THEME_FOLDER}/${FILE}"; then
# symlink and changed file, copy it in a safe place
[ -d $THEME_FOLDER_BAK ] || mkdir -p $THEME_FOLDER_BAK
@@ -54,7 +54,7 @@ case "$1" in
else
# real folder
for FILE in ${FILES}; do
[ -f $FILE ] || break
[ -f ${THEME_FOLDER}/${FILE} ] || break
if ! same_conffile "${THEME_FOLDER}/${FILE}"; then
# real folder and changed file, move it in a safe place
[ -d $THEME_FOLDER_BAK ] || mkdir -p $THEME_FOLDER_BAK