Created
December 13, 2019 07:12
-
-
Save ryanwoodsmall/bd4de1ddbfc6382700082820d8a0b3a4 to your computer and use it in GitHub Desktop.
crosware_zip_to_git.sh
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 | |
# | |
# turn a crosware master.zip into a git checkout with jgit | |
# | |
cd /usr/local | |
curl -kLO https://github.com/ryanwoodsmall/crosware/archive/master.zip | |
unzip -o master.zip | |
mv crosware-master crosware | |
cd crosware | |
jgit clone https://github.com/ryanwoodsmall/crosware.git .git --bare | |
sed -i.ORIG 's/bare = .*/bare = false/g' .git/config | |
sed -i 's/logallrefupdates = .*/logallrefupdates = true/g' .git/config | |
sed -i 's#:refs/heads#:refs/remotes/origin#g' .git/config | |
jgit fetch origin | |
jgit reset HEAD --hard | |
jgit merge origin/master | |
jgit status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment