2018-04-30 16:57:01 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#remaster lib
|
2018-05-07 00:56:46 +00:00
|
|
|
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
|
2018-04-30 16:57:01 +00:00
|
|
|
|
|
|
|
#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
|
|
|
|
}
|
2018-05-10 15:13:19 +00:00
|
|
|
|
2018-05-10 22:04:02 +00:00
|
|
|
#this func is standalone executable
|
2018-05-10 15:13:19 +00:00
|
|
|
[ -n "$1" ] && {
|
2018-05-10 22:04:02 +00:00
|
|
|
check_dependency $@
|
2018-05-10 15:13:19 +00:00
|
|
|
}
|