Check that directories exist

This commit is contained in:
Bob Mottram 2018-04-18 10:40:34 +01:00
parent 3ef6dce626
commit f547bc4540
1 changed files with 6 additions and 2 deletions

View File

@ -104,11 +104,15 @@ function pleroma_custom_logo {
if [ -f "$basedir/priv/static/static/logo.png" ]; then
if [ -f "$HOME/${PROJECT_NAME}/img/logo_fbone3.png" ]; then
cp "$HOME/${PROJECT_NAME}/img/logo_fbone3.png" "$basedir/static/logo.png"
if [ -d "$basedir/static" ]; then
cp "$HOME/${PROJECT_NAME}/img/logo_fbone3.png" "$basedir/static/logo.png"
fi
cp "$HOME/${PROJECT_NAME}/img/logo_fbone3.png" "$basedir/priv/static/static/logo.png"
else
if [ -f "/home/$MY_USERNAME/${PROJECT_NAME}/img/logo_fbone3.png" ]; then
cp "/home/$MY_USERNAME/${PROJECT_NAME}/img/logo_fbone3.png" "$basedir/static/logo.png"
if [ -d "$basedir/static" ]; then
cp "/home/$MY_USERNAME/${PROJECT_NAME}/img/logo_fbone3.png" "$basedir/static/logo.png"
fi
cp "/home/$MY_USERNAME/${PROJECT_NAME}/img/logo_fbone3.png" "$basedir/priv/static/static/logo.png"
fi
fi