Last active
August 29, 2015 14:10
-
-
Save KatrinaHoffert/f111a32d18691f52a983 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# By Mike Hoffert. Based on clean-kernel.sh in OS161. | |
# | |
# Does a better job of removing unnecessary files. Will reset the build number | |
# that OS161 thinks it is (if you don't like this, remove the line that deletes | |
# src/defs.mk). | |
# | |
# You will have to re-run conf-kernel.sh after running this (and rebuild, of | |
# course). If you use my other script, build-kernel2.sh, this script should only | |
# have to be run before handing anything in. | |
PATH=/www/docs/classes/332/t1/os161/bin:$PATH | |
cd src | |
bmake clean | |
cd ../ | |
# Preserve the sys161.conf file, but delete the rest of the root directory | |
mv root/sys161.conf . | |
rm -rf root/* | |
mv sys161.conf root | |
# Remove other folders that this script didn't remove for whatever reason | |
rm -rf src/build | |
rm -f src/kern/build | |
find src -name ".depend" -delete | |
rm -rf src/kern/compile/* | |
rm -f src/defs.mk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment