remaster/src/proj/debian

38 lines
1.2 KiB
Plaintext
Raw Normal View History

2018-05-06 17:26:21 +00:00
#!/bin/bash
#remaster lib
2018-05-07 00:56:46 +00:00
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
2018-05-06 17:26:21 +00:00
####################################
##### Base Template D E B I A N ####
####################################
# .
#tools_add [chroot_dir] [tools_list]
function tools_add() {
echo "add tools ... "
#$1 = chroot directory
chroot_dir="$1"
tools_list="$2"
chroot "$chroot_dir" /bin/bash -c "apt-get update" > /dev/null
[ "$?" == "0" ] && echo "apt-get update: success"
chroot "$chroot_dir" /bin/bash -c "apt-get install -y $tools_list" | grep -v "wird eingerichtet ..." | grep -v "Vormals nicht ausgewähltes Paket" | grep -v "Entpacken von" | grep -v "Holen: " | grep -v "Trigger für" | grep -v "update-alternatives:"
echo "done"
}
#os_update [chroot_dir]
function os_update() {
echo "updating os ... "
#$1 = chroot directory
chroot_dir="$1"
chroot "$chroot_dir" /bin/bash -c "apt-get update" > /dev/null
[ "$?" == "0" ] && echo "apt-get update: success"
chroot "$chroot_dir" /bin/bash -c "apt-get dist-upgrade -y" | grep -v "wird eingerichtet ..." | grep -v "Vormals nicht ausgewähltes Paket" | grep -v "Entpacken von" | grep -v "Holen: " | grep -v "Trigger für" | grep -v "update-alternatives:"
chroot "$chroot_dir" /bin/bash -c "apt-get clean"
echo "done"
}