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

View File

@ -0,0 +1,18 @@
#!/bin/bash
#remaster lib
[ -d "$LIBDR"] || export LIBDIR="/usr/lib/remaster/"
[ -d "$LIBDR"] || { echo "LIBDR not exist"; exit 1; }
#chroot_clean [chroot_dir]
function chroot_clean() {
echo "clean chroot ... "
chroot_dir="$1"
chroot "$chroot_dir" /bin/bash -c "apt-get clean"
chroot "$chroot_dir" /bin/bash -c "rm -r /var/cache/apt/*"
chroot "$chroot_dir" /bin/bash -c "apt-get update"
chroot "$chroot_dir" /bin/bash -c "apt-get check"
echo "done"
}