remaster/src/func/check_dependency

17 lines
445 B
Plaintext
Raw Normal View History

#!/bin/bash
#remaster lib
2018-05-06 17:26:21 +00:00
[ -d "$LIBDIR"] || export LIBDIR="/usr/lib/remaster/"
[ -d "$LIBDIR"] || { echo "LIBDIR not exist"; exit 1; }
#check_dependency
# -> 0 | -> 16
function check_dependency() {
for packet in squashfs-tools xorriso wget sed sendemail; do
[ "`dpkg -l $packet 2>&1`" == "dpkg-query: Kein Paket gefunden, das auf $packet passt" ] && {
echo "### ERROR ### Packet $packet not installed"
return 16
}
done
return 0
}