Skip to content

Instantly share code, notes, and snippets.

@syui
Created July 11, 2014 22:30
Show Gist options
  • Save syui/95283ae68668876d9f23 to your computer and use it in GitHub Desktop.
Save syui/95283ae68668876d9f23 to your computer and use it in GitHub Desktop.
#!/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