Skip to content

Instantly share code, notes, and snippets.

@arnabdas
Last active September 23, 2018 16:57
Show Gist options
  • Save arnabdas/d4014f7d85934cf066b6075cb2eeaa03 to your computer and use it in GitHub Desktop.
Save arnabdas/d4014f7d85934cf066b6075cb2eeaa03 to your computer and use it in GitHub Desktop.
Clear all the intermediate files created by 'ghc' [./clear.sh <filename>]
#!/bin/bash
if ! [ -z "$1" ]
then
find . -name $1 -not \( -name '*.hs' \) -print0 | xargs -0 rm -rf
fi
find . -name "*.o" -print0 | xargs -0 rm -rf
find . -name "*.hi" -print0 | xargs -0 rm -rf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment