Created
July 11, 2014 22:30
-
-
Save syui/95283ae68668876d9f23 to your computer and use it in GitHub Desktop.
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/zsh | |
user="syui" | |
repo=`echo $PWD:t` | |
repo_j={\"name\":\"$repo\"} | |
url="https://github.com/"$user/$repo.git | |
curl -u $user https://api.github.com/user/repos -d $repo_j | |
case $? in | |
0) | |
git init | |
echo $url | |
git remote add origin $url | |
git add * | |
git commit -a -m "f-com" | |
git push -u origin master | |
;; | |
*) | |
echo no password. | |
;; | |
esac | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment