Upgrade debs + cleaning logs

This commit is contained in:
Manfred Touron 2014-10-15 17:30:46 +00:00
parent bc7d76b966
commit 33fb7055cc
1 changed files with 9 additions and 1 deletions

View File

@ -36,6 +36,11 @@ debootstrap() {
"$SCRIPT"
}
upgrade_debs() {
secondstage apt-get update
secondstage apt-get upgrade
}
secondstage() {
# This step could be done directly by removing
sudo chroot "$TARGET" /debootstrap/debootstrap --second-stage
@ -51,12 +56,15 @@ patch_target() {
clean_target() {
clean_paths=$1
echo apt-get clean | do_in_target
do_in_target apt-get clean
for path in $clean_paths; do
if [ -e "$TARGET/$path" ]; then
sudo rm -rf "$TARGET/$path"
fi
done
for file in $(find "$TARGET/var/log" -type f); do
echo | tee $file
done
}
archive_target() {