wok-6.x view busybox/stuff/command_not_found @ rev 23018

updated libcdio-paranoia and libcdio-paranoia-dev (10.2+0.94+2 -> 10.2.2.0.1)
author Hans-G?nter Theisgen
date Tue Mar 03 13:55:44 2020 +0100 (2020-03-03)
parents 352e1cee9466
children 09d8c12d6514
line source
1 #!/bin/sh
3 FILES=/var/lib/tazpkg/files.list.lzma
4 LIST=/tmp/command-list.gz
5 [ -s $FILES ] && [ ! $LIST -nt $FILES ] && unlzma <$FILES | \
6 grep -E "(: ${PATH//:/|: })" | gzip -9 >$LIST && chmod 666 $LIST
8 lookup() {
9 zcat $LIST | grep "/$2$1$" | if read pkg file; then
10 cat <<EOT
11 Command '$1' not found, but can be installed as root with:
13 tazpkg -gi ${pkg%:}
14 ${2:+$2$1}
15 EOT
16 fi
17 }
19 MSG="$(lookup "$1")"
20 [ "$MSG" ] || MSG="$(lookup "$1" get-)"
21 echo "${MSG:-${SHELL##*/}: $1: not found}"