forked from kiss-community/kiss
fdf2775640
kiss' help output will now include all executables found in $PATH which begin with kiss-*. A comment string is optionally usable via setting the second line of the script to a string. Example: ... This also means that 'kiss <script name>' is also possible now. If I have a script in my $PATH called kiss-depends, I can now use it via kiss with 'kiss depends'.
26 lines
591 B
Bash
Executable File
26 lines
591 B
Bash
Executable File
#!/bin/sh -ef
|
|
# Remove all packages except for the base.
|
|
#
|
|
# Disable word-splittng warnings as they're safe here.
|
|
# shellcheck disable=SC2046
|
|
|
|
set --
|
|
|
|
while read -r pkg _; do
|
|
case $pkg in
|
|
baselayout|binutils|bison|busybox|bzip2|curl|flex|gcc|git|\
|
|
gzip|kiss|libressl|linux-headers|m4|make|musl|pkgconf|rsync|\
|
|
xz|zlib) ;;
|
|
|
|
*) set -- "$@" "$pkg" ;;
|
|
esac
|
|
done <<EOF
|
|
$(kiss l)
|
|
EOF
|
|
|
|
[ "$1" ] && {
|
|
printf 'WARNING: This will remove \033[1m%s\033[m package(s).\n' "$#"
|
|
printf 'Continue? [Enter/Ctrl+C]\n'
|
|
read -r _ && KISS_FORCE=1 kiss r "$@"
|
|
}
|