Merge "Do not remove the kernel src for packer build"

This commit is contained in:
Jenkins 2015-12-21 19:35:29 +00:00 committed by Gerrit Code Review
commit 122208cf0d
1 changed files with 6 additions and 1 deletions

View File

@ -22,7 +22,12 @@ apt-get -y clean
echo "==> Removing man pages"
rm -rf /usr/share/man/*
echo "==> Removing anything in /usr/src"
echo "==> Removing anything in /usr/src but this kernel src"
p2=$(uname -r | cut -d- -f1-2)
mv "/usr/src/linux-headers-${p2}" /tmp
mv /usr/src/linux-headers-$(uname -r) /tmp
rm -rf /usr/src/*
mv "/tmp/linux-headers-${p2}" /usr/src/
mv /tmp/linux-headers-$(uname -r) /usr/src/
echo "==> Removing any docs"
rm -rf /usr/share/doc/*