Created
May 2, 2012 18:27
-
-
Save jescalan/2578977 to your computer and use it in GitHub Desktop.
Finalize
This file contains hidden or 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
#!/bin/sh | |
# Installation instructions: | |
# - Download the file | |
# - mv finalize.sh finalize | |
# - chmod +x finalize | |
# - mv finalize /usr/local/bin | |
# - now you can type `finalize` in any directory and it should work | |
# NOTE: this will rename all the files in your current directory, so be careful | |
echo "" | |
echo "Are you TOTALLY SURE this is the final version? (y/n) => \c" | |
read answer | |
if [[ "$answer" == "y" ]]; then | |
for f in *; do mv "$f" "${f%.*}-final.${f##*.}"; done | |
echo "files finalized" | |
else | |
echo "welp, you'd better finalize that shit" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment