Skip to content

Instantly share code, notes, and snippets.

@ryanwoodsmall
Created December 13, 2019 07:12
Show Gist options
  • Save ryanwoodsmall/bd4de1ddbfc6382700082820d8a0b3a4 to your computer and use it in GitHub Desktop.
Save ryanwoodsmall/bd4de1ddbfc6382700082820d8a0b3a4 to your computer and use it in GitHub Desktop.
crosware_zip_to_git.sh
#!/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