wok diff zsh/receipt @ rev 18741
Finish to remove redundant messages 'Processing * commands...'; KISS get-msttcorefonts; add get-msttcorefonts2
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Dec 25 15:23:46 2015 +0200 (2015-12-25) |
parents | 9e01bc6321ea |
children | 510d209b062d |
line diff
1.1 --- a/zsh/receipt Sun Dec 20 15:13:45 2015 +0100 1.2 +++ b/zsh/receipt Fri Dec 25 15:23:46 2015 +0200 1.3 @@ -28,14 +28,14 @@ 1.4 1.5 # Rules to gen a SliTaz package suitable for Tazpkg. 1.6 genpkg_rules() 1.7 -{ 1.8 +{ 1.9 cp -a $install/bin $fs 1.10 1.11 # Config files. 1.12 - # 1.13 + 1.14 mkdir $fs/etc 1.15 cp $stuff/example.zshrc $fs/etc/zshrc 1.16 - 1.17 + 1.18 #no way around this... gen_package will not automatically copy these 1.19 mkdir -p $fs/usr/share/zsh 1.20 cp -r $install/usr/share/zsh/functions $fs/usr/share/zsh 1.21 @@ -48,21 +48,20 @@ 1.22 # 1.23 post_install() 1.24 { 1.25 - echo "Processing post-install commands..." 1.26 sh=$(readlink "$1/bin/sh") 1.27 - if [ ! "$sh" = "/bin/zsh" ]; then 1.28 - echo "" 1.29 + if [ "$sh" != '/bin/zsh' ]; then 1.30 + echo '' 1.31 echo "**** Actual SH link : $sh" 1.32 - echo "" 1.33 - echo -n "Do you want Zsh for /bin/sh (y/N) ? : " 1.34 + echo '' 1.35 + echo -n 'Do you want Zsh for /bin/sh (y/N) ? : ' 1.36 read -t 30 answer < /dev/tty 1.37 - if [ "$answer" == "y" ]; then 1.38 - echo "" 1.39 - echo -n "Removing sh link to make a new one pointing on /bin/zsh..." 1.40 + if [ "$answer" == 'y' ]; then 1.41 + echo '' 1.42 + action 'Removing sh link to make a new one pointing on /bin/zsh...' 1.43 rm "$1/bin/sh" && ln -s /bin/zsh "$1/bin/sh" 1.44 status 1.45 else 1.46 - echo "" 1.47 + echo '' 1.48 echo "Leaving /bin/sh to : $sh" 1.49 fi 1.50 fi 1.51 @@ -71,9 +70,6 @@ 1.52 # Restore a valid sh link if needed. 1.53 pre_remove() 1.54 { 1.55 - sh=$(readlink "$1/bin/sh") 1.56 - if [ ! "$sh" = "busybox" ]; then 1.57 - rm "$1/bin/sh" && 1.58 - ln -s /bin/busybox "$1/bin/sh" 1.59 - fi 1.60 + sh=$(readlink "$1/bin/sh") 1.61 + [ "$sh" != 'busybox' ] && ln -sf /bin/busybox "$1/bin/sh" 1.62 }