2022-01-28 08:24:31 +01:00
|
|
|
#!/bin/bash
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
# created by Tobias Powalowski <tpowa@archlinux.org>
|
|
|
|
|
|
|
|
_BASENAME="$(basename "${0}")"
|
|
|
|
|
|
|
|
usage () {
|
|
|
|
echo "${_BASENAME}: usage"
|
|
|
|
echo "Check on missing binaries in archboot environment"
|
|
|
|
echo "-------------------------------------------------"
|
|
|
|
echo "Usage: ${_BASENAME} <package>"
|
|
|
|
echo "This will check binaries from package, if they exist"
|
|
|
|
echo "and report missing to binary.txt"
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
|
|
|
[[ -z "${1}" ]] && usage
|
|
|
|
|
|
|
|
if [[ ! "$(cat /etc/hostname)" == "archboot" ]]; then
|
|
|
|
echo "This script should only be run in booted archboot environment. Aborting..."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo $1 >binary.txt
|
2022-01-28 09:16:19 +01:00
|
|
|
for i in $(pacman -Ql $1 | grep "/usr/bin/..*"$ | cut -d' ' -f2);do
|
2022-01-28 08:24:31 +01:00
|
|
|
which $i >/dev/null || echo $i>>binary.txt
|
|
|
|
done
|