Update / Preliminary Response
, , , () , .
script , bash -x test.sh, devnull .
. , .
username@COMPUTERNAME /d/test
$ bash -x test.sh
+ initg gh username bash_test desc
+ local API=https://api.bitbucket.org/1.0/repositories/
+ local 'DATA=name=bash_test&description=desc&is_private=true&scm=git'
+ local REMOTE=ssh://git@bitbucket.org/username/bash_test
+ '[' gh == gh ']'
+ API=https://api.github.com/user/repos
+ DATA='{"name":"$3", "description": "$4"}'
+ REMOTE=git@github.com:username/bash_test
+ '[' -z https://api.github.com/user/repos ']'
+ '[' -z '{"name":"$3", "description": "$4"}' ']'
+ '[' -z git@github.com:username/bash_test ']'
+ '[' -z username ']'
+ curl -X POST -u username https://api.github.com/user/repos -d '{"name":"$3",' '"description":' '"$4"}'
+ Enter host password for user 'username':
:
, , , (), DATA. -, , script, $3 $4, .
DATA='{"name":"$3", "description": "$4"}'
, , , .
, [[ ]] , ${3}, DATA ( ):
DATA="{\"name\":\"${3}\",\"description\":\"${4}\"}"
script
, - , . , $DATA, curl, '{"name":"$3",' '"description":' '"$4"}'