mirror of
				https://github.com/SuperBFG7/ympd
				synced 2025-10-31 13:53:00 +00:00 
			
		
		
		
	Feat: install don't override existing smart playlists
This commit is contained in:
		| @@ -56,4 +56,5 @@ install(FILES dist/htdocs/css/mympd.min.css DESTINATION share/${PROJECT_NAME}/ht | ||||
| install(DIRECTORY htdocs/assets DESTINATION share/${PROJECT_NAME}/htdocs) | ||||
| install(DIRECTORY DESTINATION ../var/lib/${PROJECT_NAME}/pics) | ||||
| install(DIRECTORY DESTINATION ../var/lib/${PROJECT_NAME}/tmp) | ||||
| install(DIRECTORY DESTINATION ../var/lib/${PROJECT_NAME}/state) | ||||
| install(DIRECTORY dist/smartpls DESTINATION ../var/lib/${PROJECT_NAME}) | ||||
|   | ||||
| @@ -49,6 +49,18 @@ post_upgrade() { | ||||
|     /usr/share/mympd/crcert.sh | ||||
|   fi | ||||
|  | ||||
|   # move smartpls into place unless already existing | ||||
|   for PLDIST in /var/lib/mympd/smartpls/*.dist | ||||
|   do | ||||
|     PLS=$(basename $PLDIST .dist) | ||||
|     if [ -f /var/lib/mympd/smartpls/$PLS ] | ||||
|     then | ||||
|       rm $PLDIST | ||||
|     else | ||||
|       mv $PLDIST /var/lib/mympd/smartpls/$PLS | ||||
|     fi | ||||
|   done | ||||
|  | ||||
|   # move config into place unless already existing | ||||
|   if [ ! -f /etc/mympd/mympd.conf ] | ||||
|   then  | ||||
|   | ||||
| @@ -63,6 +63,19 @@ fi | ||||
|  | ||||
| [ -e /usr/share/mympd/htdocs/pics ] || ln -s /var/lib/mympd/pics /usr/share/mympd/htdocs/ | ||||
|  | ||||
| # move smartpls into place unless already existing | ||||
| for PLDIST in /var/lib/mympd/smartpls/*.dist | ||||
| do | ||||
|   PLS=$(basename $PLDIST .dist) | ||||
|   if [ -f /var/lib/mympd/smartpls/$PLS ] | ||||
|   then | ||||
|     rm $PLDIST | ||||
|   else | ||||
|     mv $PLDIST /var/lib/mympd/smartpls/$PLS | ||||
|   fi | ||||
| done | ||||
|  | ||||
| # move config into place unless already existing | ||||
| if [ ! -f /etc/mympd/mympd.conf ] | ||||
| then  | ||||
|   mv /etc/mympd/mympd.conf.dist /etc/mympd/mympd.conf | ||||
|   | ||||
							
								
								
									
										12
									
								
								debian/postinst
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								debian/postinst
									
									
									
									
										vendored
									
									
								
							| @@ -33,6 +33,18 @@ then | ||||
|   systemctl enable mympd | ||||
| fi | ||||
|  | ||||
| # move smartpls into place unless already existing | ||||
| for PLDIST in /var/lib/mympd/smartpls/*.dist | ||||
| do | ||||
|   PLS=$(basename $PLDIST .dist) | ||||
|   if [ -f /var/lib/mympd/smartpls/$PLS ] | ||||
|   then | ||||
|     rm $PLDIST | ||||
|   else | ||||
|     mv $PLDIST /var/lib/mympd/smartpls/$PLS | ||||
|   fi | ||||
| done | ||||
|  | ||||
| # move config into place unless already existing | ||||
| if [ ! -f /etc/mympd/mympd.conf ] | ||||
| then  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jcorporation
					jcorporation