1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-06-27 23:23:15 +00:00

Fix: renaming of /var/lib/mympd/smartpls/*.dist files

This commit is contained in:
jcorporation 2018-10-01 23:11:14 +02:00
parent 044eaa2ad4
commit 2eeddc9786
3 changed files with 25 additions and 15 deletions

View File

@ -52,12 +52,15 @@ post_upgrade() {
# move smartpls into place unless already existing # move smartpls into place unless already existing
for PLDIST in /var/lib/mympd/smartpls/*.dist for PLDIST in /var/lib/mympd/smartpls/*.dist
do do
PLS=$(basename $PLDIST .dist) if [ -f "$PLDIST" ]
if [ -f /var/lib/mympd/smartpls/$PLS ]
then then
rm $PLDIST PLS=$(basename $PLDIST .dist)
else if [ -f /var/lib/mympd/smartpls/$PLS ]
mv $PLDIST /var/lib/mympd/smartpls/$PLS then
rm $PLDIST
else
mv -v $PLDIST /var/lib/mympd/smartpls/$PLS
fi
fi fi
done done

View File

@ -66,12 +66,15 @@ fi
# move smartpls into place unless already existing # move smartpls into place unless already existing
for PLDIST in /var/lib/mympd/smartpls/*.dist for PLDIST in /var/lib/mympd/smartpls/*.dist
do do
PLS=$(basename $PLDIST .dist) if [ -f "$PLDIST" ]
if [ -f /var/lib/mympd/smartpls/$PLS ]
then then
rm $PLDIST PLS=$(basename $PLDIST .dist)
else if [ -f /var/lib/mympd/smartpls/$PLS ]
mv $PLDIST /var/lib/mympd/smartpls/$PLS then
rm $PLDIST
else
mv -v $PLDIST /var/lib/mympd/smartpls/$PLS
fi
fi fi
done done

14
debian/postinst vendored
View File

@ -36,15 +36,19 @@ fi
# move smartpls into place unless already existing # move smartpls into place unless already existing
for PLDIST in /var/lib/mympd/smartpls/*.dist for PLDIST in /var/lib/mympd/smartpls/*.dist
do do
PLS=$(basename $PLDIST .dist) if [ -f "$PLDIST" ]
if [ -f /var/lib/mympd/smartpls/$PLS ]
then then
rm $PLDIST PLS=$(basename $PLDIST .dist)
else if [ -f /var/lib/mympd/smartpls/$PLS ]
mv $PLDIST /var/lib/mympd/smartpls/$PLS then
rm $PLDIST
else
mv -v $PLDIST /var/lib/mympd/smartpls/$PLS
fi
fi fi
done done
# move config into place unless already existing # move config into place unless already existing
if [ ! -f /etc/mympd/mympd.conf ] if [ ! -f /etc/mympd/mympd.conf ]
then then