wok-current diff ncmpcpp/receipt @ rev 17093

Up qupzilla
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Thu Aug 28 03:31:30 2014 +0200 (2014-08-28)
parents 633aff33b052
children 17c84cd0c81a
line diff
     1.1 --- a/ncmpcpp/receipt	Sun Aug 24 21:21:42 2014 +0200
     1.2 +++ b/ncmpcpp/receipt	Thu Aug 28 03:31:30 2014 +0200
     1.3 @@ -31,19 +31,19 @@
     1.4  # Rules to gen a SliTaz package suitable for Tazpkg.
     1.5  genpkg_rules()
     1.6  {
     1.7 -	mkdir -p $fs/usr/share
     1.8 +	mkdir -p $fs/usr/share $fs/etc/skel/.ncmpcpp
     1.9  	cp -a $install/usr/bin $fs/usr
    1.10  	cp -a $install/usr/share/doc $fs/usr/share
    1.11 +	ln $fs/usr/share/doc/ncmpcpp/config $fs/etc/skel/.ncmpcpp
    1.12 +	ln $fs/usr/share/doc/ncmpcpp/keys $fs/etc/skel/.ncmpcpp
    1.13  }
    1.14  
    1.15  post_install()
    1.16  {
    1.17 -	echo -n "Enabling configuration files..."
    1.18 -	for i in $(ls $1/home); do
    1.19 -		mkdir -p $1/home/$i/.ncmpcpp
    1.20 -		cp $1/etc/skel/.tiptoprc $1/home/$i
    1.21 -		cp $1/usr/share/doc/ncmpcpp/config /home/$i/.ncmpcpp
    1.22 -		cp $1/usr/share/doc/ncmpcpp/keys /home/$i/.ncmpcpp
    1.23 +	for i in $(ls $1/home 2> /dev/null); do
    1.24 +		[ -d $1/home/$i/.ncmpcpp ] && continue
    1.25 +		echo -n "Enabling configuration files for $i ..."
    1.26 +		cp -a $1/etc/skel/.ncmpcpp $1/home/$i/
    1.27  		sed -i 's|#mpd_music_dir = ""|mpd_music_dir = "/home/'$i'/music"|' /home/$i/.ncmpcpp/config
    1.28  		# Change permissions also
    1.29  		chroot $1/ chown -R $i.users /home/$i/.ncmpcpp
    1.30 @@ -57,5 +57,3 @@
    1.31  	rm -rf /home/*/.ncmpcpp
    1.32  	status
    1.33  }
    1.34 -	
    1.35 -