Last active
May 11, 2017 02:54
-
-
Save pmachapman/5316fcd83251c2693aa7217f820b5f97 to your computer and use it in GitHub Desktop.
Converts a series of zip files into git revisions. Can be used as a one line bash command. Change paths to suit....
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/bash | |
for f in `ls -X *.zip | sort --version-sort`;\ | |
do rm -rf ~/source/repos/unrar/* ;\ | |
unzip $f -d ~/source/repos/unrar/ ;\ | |
cd ~/source/repos/unrar/ ;\ | |
git add . ;\ | |
git commit -m "Updated to ${f%.zip}" ;\ | |
cd ~/desktop/unrarsrc/ ;\ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment