Skip to content

Instantly share code, notes, and snippets.

@thegorgon
Created August 18, 2011 19:03
Show Gist options
  • Save thegorgon/1154867 to your computer and use it in GitHub Desktop.
Save thegorgon/1154867 to your computer and use it in GitHub Desktop.
Cleanup Release Directory
function cleanup() {
for release in `ls -x /u/app/releases/`
do
if [ $release != "./" -a $release != "../" -a "`readlink /u/app/current`/" != "/u/app/releases/$release" ]; then `rm -rf /u/app/releases/$release`; fi
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment