clean.sh 261 B

1234567891011121314
  1. #!/usr/bin/bash -x
  2. ##
  3. # post execution steps to reduce image size
  4. ##
  5. # Clean the pacman cache.
  6. yes | pacman -Scc
  7. # Write zeros to improve virtual disk compaction.
  8. zerofile=$(mktemp /zerofile.XXXXX)
  9. dd if=/dev/zero of="$zerofile" bs=1M
  10. rm -f "$zerofile"
  11. sync