Last active
August 29, 2015 14:03
-
-
Save transistor1/d75650c5540e5eafed9c to your computer and use it in GitHub Desktop.
Push a folder to a plugin repo
This file contains 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 | |
USER=git-username | |
PREFIX=shellista | |
REPO=$PREFIX-$1 | |
echo "Enter password:" | |
read -s PASSWORD | |
curl -u "$USER:$PASSWORD" https://api.github.com/user/repos -d "{\"name\":\"$REPO\"}" | |
git init . | |
git add "$1" | |
git commit -m "Initial commit; copy of $1 repo in $PREFIX" | |
git push https://$USER:[email protected]/$USER/$REPO.git master | |
rm -rf .git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment