wok-current rev 21869
busybox/command_not_found: use $PATH
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Sep 25 10:59:33 2019 +0200 (2019-09-25) |
parents | f8a66ba2df40 |
children | 7a22ba39ec41 |
files | busybox/stuff/command_not_found emacs/receipt uemacs/receipt |
line diff
1.1 --- a/busybox/stuff/command_not_found Tue Sep 24 17:15:29 2019 +0100 1.2 +++ b/busybox/stuff/command_not_found Wed Sep 25 10:59:33 2019 +0200 1.3 @@ -1,11 +1,12 @@ 1.4 #!/bin/sh 1.5 1.6 -ZLIST=/var/lib/tazpkg/files.list.lzma 1.7 -LIST=/tmp/command-list 1.8 -[ ! $LIST -nt $ZLIST ] && unlzma <$ZLIST | grep -E '(usr/games/|bin/)' >$LIST && chmod 666 $LIST 1.9 +FILES=/var/lib/tazpkg/files.list.lzma 1.10 +LIST=/tmp/command-list.gz 1.11 +[ ! $LIST -nt $FILES ] && unlzma <$FILES | \ 1.12 +grep -E "(: $(echo ${PATH//:/|: }))" | gzip -9 >$LIST && chmod 666 $LIST 1.13 1.14 lookup() { 1.15 - grep -s "/$2$1$" $LIST | while read pkg file; do 1.16 + zcat $LIST | grep "/$2$1$" | while read pkg file; do 1.17 cat <<EOT 1.18 Command '$1' not found, but can be installed as root with: 1.19
2.1 --- a/emacs/receipt Tue Sep 24 17:15:29 2019 +0100 2.2 +++ b/emacs/receipt Wed Sep 25 10:59:33 2019 +0200 2.3 @@ -55,6 +55,8 @@ 2.4 cp -a $install/usr/bin/$file $fs/usr/bin 2.5 done 2.6 status 2.7 + ln -s /usr/bin/emacs-$VERSION $fs/usr/bin/emacs 2.8 + ln -s /usr/bin/emacs-$VERSION $fs/usr/bin/xemacs 2.9 # Lib files 2.10 echo -n "Copying emacs lib files" 2.11 cp -a $install/usr/lib $fs/usr 2.12 @@ -184,17 +186,3 @@ 2.13 cd $fs/usr/share/$PACKAGE/$VERSION 2.14 ln -s ../site-lisp site-lisp 2.15 } 2.16 - 2.17 -post_install() 2.18 -{ 2.19 - # linking /usr/bin/emacs to new version 2.20 - [ -h "$1/usr/bin/emacs" ] && rm -f "$1/usr/bin/emacs" 2.21 - ln -s /usr/bin/emacs-$VERSION "$1/usr/bin/emacs" 2.22 -} 2.23 - 2.24 -post_remove() 2.25 -{ 2.26 - rm -rf "$1/usr/share/emacs" 2.27 - rm -rf "$1/usr/lib/emacs" 2.28 - rm -f "$1/usr/bin/emacs" 2.29 -}