mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
add base checking to binary script
This commit is contained in:
parent
4a2666dd94
commit
11d8186c72
1 changed files with 10 additions and 3 deletions
|
@ -21,8 +21,15 @@ if [[ ! "$(cat /etc/hostname)" == "archboot" ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
echo "${1}" >binary.txt
|
||||
# update pacman db first
|
||||
pacman -Sy
|
||||
if [[ "${1}" == "base" ]]; then
|
||||
PACKAGE="$(pacman -Qi base | grep Depends | cut -d ":" -f2)"
|
||||
else
|
||||
PACKAGE="${1}"
|
||||
fi
|
||||
echo "${PACKAGE}" >binary.txt
|
||||
#shellcheck disable=SC2086
|
||||
for i in $(pacman -Ql ${1} | grep "/usr/bin/..*"$ | cut -d' ' -f2);do
|
||||
which "${i}" >/dev/null || echo "${i}">>binary.txt
|
||||
for i in $(pacman -Ql ${PACKAGE} | grep "/usr/bin/..*"$ | cut -d' ' -f2); do
|
||||
which "${i}" >/dev/null || echo "${i}">>binary.txt
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue