diff options
| author | Haoran S. Diao <0@hairydiode.xyz> | 2019-02-11 18:02:10 -0500 |
|---|---|---|
| committer | Haoran S. Diao <0@hairydiode.xyz> | 2019-02-11 18:02:10 -0500 |
| commit | 8df9990b29815e8db46ecaa61b83676fdf982f97 (patch) | |
| tree | 8f916a971bd88ca04495d696e0dbcca5c99037ca /mkgit-client | |
| parent | 945c9b851a2ba97acec0bd7efab44f492f30aa67 (diff) | |
Added user and server argument to client script
Added user argument to server script
fixed argument checking
Diffstat (limited to 'mkgit-client')
| -rwxr-xr-x | mkgit-client | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mkgit-client b/mkgit-client index 1cfb245..12acd24 100755 --- a/mkgit-client +++ b/mkgit-client @@ -1,8 +1,10 @@ #!/bin/bash -if [ $1 == "" ]; then - echo usage: mkgit-client [repository name] +if [ "$2" == "" ]; then + echo usage: mkgit-client [repository name] [git user]@[server] + exit fi -git remote add origin git@hairydiode.xyz:$1 +git remote rm origin +git remote add origin $2:$1 git push --set-upstream origin master BRANCHES=$(git branch | sed "s/*//g") for BRANCH in ${BRANCHES[@]}; do |
