From d132d33f54dc77c074e01b571b99e8bcb9a86d27 Mon Sep 17 00:00:00 2001 From: kinoshita-eos Date: Tue, 20 Jan 2015 15:42:31 +0900 Subject: [PATCH] Modify: make git-init(-XXXX) modified: Makefile --- Makefile | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index dd4d23846a..8f0e09f98b 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ EOS_GIT_REPOSITRY_NOUSER=git://git.sourceforge.jp/gitroot/eos/base.git EOS_GIT_REPOSITRY_OPTIONAL= git.sourceforge.jp:/gitroot/eos/optional.git EOS_GIT_REPOSITRY_OPTIONAL_NOUSER=git://git.sourceforge.jp/gitroot/eos/optional.git EOS_GIT_REPOSITRY_TUTORIAL= git.sourceforge.jp:/gitroot/eos/tutorial.git -EOS_GIT_REPOSITRY_TUTORILA_NOUSER=git://git.sourceforge.jp/gitroot/eos/tutorial.git +EOS_GIT_REPOSITRY_TUTORIAL_NOUSER=git://git.sourceforge.jp/gitroot/eos/tutorial.git EOS_GIT_REPOSITRY_DATA= git.sourceforge.jp:/gitroot/eos/data.git EOS_GIT_REPOSITRY_DATA_NOUSER=git://git.sourceforge.jp/gitroot/eos/data.git EOS_GIT_REPOSITRY_OTHERS= git.sourceforge.jp:/gitroot/eos/others.git @@ -268,29 +268,49 @@ git-init-all:: git-init git-init-data git-init-optional git-init-tutorial git-in git-init:: if [ ! -d .git ] ; then git init ; fi SSS=`git remote -v | grep origin`; if [ ! -z "$$SSS" ] ; then git remote rm origin ; fi ; \ - git remote add origin $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY) + if [ -z $${EOS_GITUSER} ] ; then \ + git remote add origin $(EOS_GIT_REPOSITRY_NOUSER); \ + else \ + git remote add origin $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY); \ + fi ; git-init-data:: if [ ! -d data ] ; then mkdir data; fi cd data; SSS=`git remote -v | grep data`; if [ ! -z "$$SSS" ] ; then git remote rm data ; fi ; \ - git remote add data $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_DATA) + if [ -z $${EOS_GITUSER} ] ; then \ + git remote add data $(EOS_GIT_REPOSITRY_DATA_NOUSER); \ + else \ + git remote add data $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_DATA); \ + fi ; git-init-optional:: if [ ! -d optional ] ; then mkdir optional; fi if [ ! -L doc ] ; then ln -sf optional/doc . ; fi if [ ! -L objects ] ; then ln -sf optional/objects . ; fi cd optional; SSS=`git remote -v | grep optional`; if [ ! -z "$$SSS" ] ; then git remote rm optional ; fi ; \ - git remote add optional $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OPTIONAL) + if [ -z $${EOS_GITUSER} ] ; then \ + git remote add optional $(EOS_GIT_REPOSITRY_OPTIONAL_NOUSER); \ + else \ + git remote add optional $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OPTIONAL); \ + fi ; git-init-tutorial:: if [ ! -d tutorial ] ; then mkdir tutorial ; fi cd tutorial; SSS=`git remote -v | grep tutorial`; if [ ! -z "$$SSS" ] ; then git remote rm tutorial ; fi ; \ - git remote add tutorial $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_TUTORIAL) + if [ -z $${EOS_GITUSER} ] ; then \ + git remote add tutorial $(EOS_GIT_REPOSITRY_TUTORIAL_NOUSER); \ + else \ + git remote add tutorial $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_TUTORIAL); \ + fi ; git-init-others:: if [ ! -d others ] ; then mkdir others; fi cd others ; SSS=`git remote -v | grep others`; if [ ! -z "$$SSS" ] ; then git remote rm others ; fi ; \ - git remote add others $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS) + if [ -z $${EOS_GITUSER} ] ; then \ + git remote add others $(EOS_GIT_REPOSITRY_OTHERS_NOUSER); \ + else \ + git remote add others $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS); \ + fi ; git-init-others2:: if [ ! -d others2 ] ; then mkdir others2; fi -- 2.11.0