Split main func (no os/proj dependency)

This commit is contained in:
6543
2018-04-30 18:57:01 +02:00
parent b5ab4f1ec9
commit f2b3b5f530
17 changed files with 432 additions and 327 deletions

16
src/func/check_dependency Normal file
View File

@ -0,0 +1,16 @@
#!/bin/bash
#remaster lib
[ -d "$LIBDR"] || export LIBDIR="/usr/lib/remaster/"
[ -d "$LIBDR"] || { echo "LIBDR 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
}