EOS_GIT_REPOSITRY_OTHERS= git.sourceforge.jp:/gitroot/eos/others.git
EOS_GIT_REPOSITRY_OTHERS_NOUSER=git://git.sourceforge.jp/gitroot/eos/others.git
+EOS_GIT_REPOSITRY_HOSTDEPEND=git.sourceforge.jp:/gitroot/eos/hostdepend
help::
@echo ">> Help"
git-add-all:: git-add git-add-data git-add-optional git-add-tutorial git-add-others
-git-add::
+git-add::
git add -v --all .
+git-add-hostdepend::
+ git remote add -f hostdepend$${EOS_HOSTDIER} $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_HOSTDEPEND)$${EOS_HOSTDIR}.git
+ git subtree add --prefix=hostdepend/$${EOS_HOSTDIR} --squash hostdepend$${EOS_HOSTDIER} master
+
git-add-optional::
cd optional; git add -v --all .
git-push-all:: git-push git-push-data git-push-optional git-push-tutorial git-push-others
-git-push::
+git-push::git-push-hostdepend
# git push origin master --tags
@export DIRECTORYNAME=./; \
export ORIGINNAME=origin; \
make git-push-with-check;
+git-push-hostdepend::
+ git subtree push --prefix=hostdepend/$${EOS_HOSTDIR} --squash hostdepend$${EOS_HOSTDIR} master
+
git-push-optional::
# cd optional; git push optional master --tags
@export DIRECTORYNAME=optional; \
git-fetch-all:: git-fetch git-fetch-data git-fetch-optional git-fetch-tutorial git-fetch-others
-git-fetch::
+git-fetch::git-pull-hostdepend
cd . ; git fetch origin master --tags ; git log -1
+git-pull-hostdepend::
+ git subtree pull --prefix=hostdepend/$${EOS_HOSTDIR} hostdpend$${EOS_HOSTDIR}.git master
+
git-fetch-data::
cd data ; git fetch data master --tags ; git log -1
git-init-all:: git-init git-init-data git-init-optional git-init-tutorial git-init-others
-git-init::
+git-init:: git-add-hostdepend
if [ ! -d .git ] ; then git init ; fi
- SSS=`git remote -v | grep origin`; if [ ! -z "$$SSS" ] ; then git remote rm origin ; fi ; \
- if [ -z $${EOS_GITUSER} ] ; then \
- git remote add origin $(EOS_GIT_REPOSITRY_NOUSER); \
- else \
- git remote add origin $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY); \
- fi ;
+ @export ORIGINNAME=origin; \
+ make git-remote-add;
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 ; \
- 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 ;
+ cd data; \
+ if [ ! -d .git ] ; then git init ; fi ;
+ @export ORIGINNAME=data; \
+ make git-remote-add-data;
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 ; \
- 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 ;
+ cd optional; \
+ if [ ! -d .git ] ; then git init ; fi ;
+ @export ORIGINNAME=optional; \
+ make git-remote-add-optional;
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 ; \
- 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 ;
+ cd tutorial; \
+ if [ ! -d .git ] ; then git init ; fi ;
+ @export ORIGINNAME=tutorial; \
+ make git-remote-add-tutorial;
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 ; \
- 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 ;
+ cd others ; \
+ if [ ! -d .git ] ; then git init ; fi ;
+ @export ORIGINNAME=others; \
+ make git-remote-add-others;
git-init-others2::
if [ ! -d others2 ] ; then mkdir others2; fi
cd others2 ; git remote add others2 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS)
-git-clone-all:: git-clone git-clone-data git-clone-optional git-clone-tutorial git-clone-others
+git-clone-all:: git-clone
+ @if [ ! -z "$${EOS_HOME}" -a -d "$${EOS_HOME}" ] ; then \
+ cd $${EOS_HOME} ; \
+ make git-clone-data git-clone-optional git-clone-tutorial git-clone-others; \
+ fi;
-git-clone:git-init
- if [ ! -d .git ] ; \
- then \
- if [ -z $${EOS_GITUSER} ] ; then \
- git clone --depth 1 $(EOS_GIT_REPOSITRY_NOUSER) ./ ; \
- else \
- git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY) ./ ; \
- fi ; \
- fi
+git-clone::
+ @if [ ! -z "$${EOS_HOME}" -a -d "$${EOS_HOME}" ] ; then \
+ TMPDIRECTORY=$$(pwd) ; \
+ cd $${EOS_HOME} ; \
+ if [ ! -d .git ] ; \
+ then \
+ if [ -z $${EOS_GITUSER} ] ; then \
+ git clone --depth 1 $(EOS_GIT_REPOSITRY_NOUSER) ./ ; \
+ else \
+ git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY) ./ ; \
+ fi ; \
+ cd $${TMPDIRECTORY}; \
+ export ORIGINNAME=origin; \
+ make git-remote-add; \
+ fi; \
+ fi;
-git-clone-data: git-init-data
- cd data; if [ ! -d .git ] ; \
+git-clone-data::
+ if [ ! -d data ] ; then mkdir data; fi
+ @cd data; if [ ! -d .git ] ; \
then \
if [ -z $${EOS_GITUSER} ] ; then \
git clone --depth 1 $(EOS_GIT_REPOSITRY_DATA_NOUSER) ./ ; \
else \
git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_DATA) ./; \
fi ; \
+ cd ../ ; \
+ export ORIGINNAME=data; \
+ make git-remote-add-data; \
fi
-git-clone-optional: git-init-optional
- cd optional; if [ ! -d .git ] ; \
+git-clone-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; if [ ! -d .git ] ; \
then \
if [ -z $${EOS_GITUSER} ] ; then \
git clone --depth 1 $(EOS_GIT_REPOSITRY_OPTIONAL_NOUSER) ./ ; \
else \
git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OPTIONAL) ./ ; \
fi ; \
+ cd ../ ; \
+ export ORIGINNAME=optional; \
+ make git-remote-add-optional; \
fi
-git-clone-tutorial: git-init-tutorial
- cd tutorial; if [ ! -d .git ] ; \
+git-clone-tutorial::
+ if [ ! -d tutorial ] ; then mkdir tutorial ; fi
+ @cd tutorial; if [ ! -d .git ] ; \
then \
if [ -z $${EOS_GITUSER} ] ; then \
git clone --depth 1 $(EOS_GIT_REPOSITRY_TUTORIAL_NOUSER) ./ ; \
else \
git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_TUTORIAL) ./ ; \
fi; \
+ cd ../ ; \
+ export ORIGINNAME=tutorial; \
+ make git-remote-add-tutorial; \
fi
-git-clone-others: git-init-others
- cd others ; if [ ! -d .git ] ; \
+git-clone-others::
+ if [ ! -d others ] ; then mkdir others; fi
+ @cd others ; if [ ! -d .git ] ; \
then \
if [ -z $${EOS_GITUSER} ] ; then \
git clone --depth 1 $(EOS_GIT_REPOSITRY_OTHERS_NOUSER) ./ ; \
else \
git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS) ./ ; \
fi; \
+ cd ../ ; \
+ export ORIGINNAME=others; \
+ make git-remote-add-others; \
fi
+git-remote-add::
+ @if [ ! -z "$$ORIGINNAME" -a ! -z "$${EOS_HOME}" -a -d "$${EOS_HOME}" ]; then \
+ cd $${EOS_HOME}; \
+ SSS=`git remote -v | awk '{print $$1}' | grep origin`; if [ ! -z "$$SSS" ] ; then git remote rm origin ; fi ; \
+ if [ -z $${EOS_GITUSER} ] ; then \
+ git remote add origin $(EOS_GIT_REPOSITRY_NOUSER); \
+ else \
+ git remote add origin $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY); \
+ fi ; \
+ fi;
+
+git-remote-add-data::
+ @if [ ! -z "$$ORIGINNAME" ]; then \
+ cd $$ORIGINNAME; \
+ SSS=`git remote -v | awk '{print $$1}' | grep data`; if [ ! -z "$$SSS" ] ; then git remote rm data ; fi ; \
+ 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 ; \
+ fi;
+
+git-remote-add-optional::
+ @if [ ! -z "$$ORIGINNAME" ]; then \
+ cd $$ORIGINNAME; \
+ SSS=`git remote -v | awk '{print $$1}' | grep optional`; if [ ! -z "$$SSS" ] ; then git remote rm optional ; fi ; \
+ 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 ; \
+ fi;
+
+git-remote-add-tutorial::
+ @if [ ! -z "$$ORIGINNAME" ]; then \
+ cd $$ORIGINNAME; \
+ SSS=`git remote -v | awk '{print $$1}' | grep tutorial`; if [ ! -z "$$SSS" ] ; then git remote rm tutorial ; fi ; \
+ 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 ; \
+ fi;
+git-remote-add-others::
+ @if [ ! -z "$$ORIGINNAME" ]; then \
+ cd $$ORIGINNAME; \
+ SSS=`git remote -v | awk '{print $$1}' | grep others`; if [ ! -z "$$SSS" ] ; then git remote rm others ; fi ; \
+ 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 ; \
+ fi;