wok diff openbox-theme-blinder/receipt @ rev 19065
Take care on root in post_install
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Apr 21 09:45:48 2016 +0200 (2016-04-21) |
parents | f8b381f96ad6 |
children | 887b3b11683d |
line diff
1.1 --- a/openbox-theme-blinder/receipt Thu Feb 18 16:54:27 2016 +0200 1.2 +++ b/openbox-theme-blinder/receipt Thu Apr 21 09:45:48 2016 +0200 1.3 @@ -31,17 +31,17 @@ 1.4 post_install() 1.5 { 1.6 # Set Openbox theme 1.7 - for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do 1.8 + for i in $1/etc/xdg/openbox/rc.xml $1/home/*/.config/openbox/rc.xml; do 1.9 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>Blinder<|' $i 1.10 done 1.11 - pgrep openbox >/dev/null && openbox --reconfigure 1.12 + [ -z "$1" ] && pgrep openbox >/dev/null && openbox --reconfigure 1.13 } 1.14 1.15 pre_remove() 1.16 { 1.17 # Restore Openbox theme (SliTaz) 1.18 - for i in /etc/xdg/openbox/rc.xml /home/*/.config/openbox/rc.xml; do 1.19 + for i in $1/etc/xdg/openbox/rc.xml $1/home/*/.config/openbox/rc.xml; do 1.20 [ -f $i ] && sed -i '/<theme>/,/<name>/ s|>[^<]*<|>SliTaz<|' $i 1.21 done 1.22 - pgrep openbox >/dev/null && openbox --reconfigure 1.23 + [ -z "$1" ] && pgrep openbox >/dev/null && openbox --reconfigure 1.24 }