mirror of
				https://github.com/SuperBFG7/ympd
				synced 2025-10-30 21:33: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 htdocs/assets DESTINATION share/${PROJECT_NAME}/htdocs) | ||||||
| install(DIRECTORY DESTINATION ../var/lib/${PROJECT_NAME}/pics) | install(DIRECTORY DESTINATION ../var/lib/${PROJECT_NAME}/pics) | ||||||
| install(DIRECTORY DESTINATION ../var/lib/${PROJECT_NAME}/tmp) | 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}) | install(DIRECTORY dist/smartpls DESTINATION ../var/lib/${PROJECT_NAME}) | ||||||
|   | |||||||
| @@ -49,6 +49,18 @@ post_upgrade() { | |||||||
|     /usr/share/mympd/crcert.sh |     /usr/share/mympd/crcert.sh | ||||||
|   fi |   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 |   # move config into place unless already existing | ||||||
|   if [ ! -f /etc/mympd/mympd.conf ] |   if [ ! -f /etc/mympd/mympd.conf ] | ||||||
|   then  |   then  | ||||||
|   | |||||||
| @@ -63,6 +63,19 @@ fi | |||||||
|  |  | ||||||
| [ -e /usr/share/mympd/htdocs/pics ] || ln -s /var/lib/mympd/pics /usr/share/mympd/htdocs/ | [ -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 ] | if [ ! -f /etc/mympd/mympd.conf ] | ||||||
| then  | then  | ||||||
|   mv /etc/mympd/mympd.conf.dist /etc/mympd/mympd.conf |   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 |   systemctl enable mympd | ||||||
| fi | 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 | # move config into place unless already existing | ||||||
| if [ ! -f /etc/mympd/mympd.conf ] | if [ ! -f /etc/mympd/mympd.conf ] | ||||||
| then  | then  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 jcorporation
					jcorporation