• R/O
  • HTTP
  • SSH
  • HTTPS

base: Commit

This repository is a base of Eos.


Commit MetaInfo

Revisionc1ae729263cc46280649bdce66a74f2b6ebb29e0 (tree)
Time2015-01-21 11:47:03
Authorkinoshita-eos <kinoshita@yasu...>
Commiterkinoshita-eos

Log Message

Modify: Bug Fixed: make git-init(-XXXX) and make git-clone-(XXXX)
modified: Makefile

Change Summary

Incremental Difference

--- a/Makefile
+++ b/Makefile
@@ -267,105 +267,175 @@ git-init-all:: git-init git-init-data git-init-optional git-init-tutorial git-in
267267
268268 git-init::
269269 if [ ! -d .git ] ; then git init ; fi
270- SSS=`git remote -v | grep origin`; if [ ! -z "$$SSS" ] ; then git remote rm origin ; fi ; \
271- if [ -z $${EOS_GITUSER} ] ; then \
272- git remote add origin $(EOS_GIT_REPOSITRY_NOUSER); \
273- else \
274- git remote add origin $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY); \
275- fi ;
270+ @export ORIGINNAME=origin; \
271+ make git-remote-add;
276272
277273 git-init-data::
278274 if [ ! -d data ] ; then mkdir data; fi
279- cd data; SSS=`git remote -v | grep data`; if [ ! -z "$$SSS" ] ; then git remote rm data ; fi ; \
280- if [ -z $${EOS_GITUSER} ] ; then \
281- git remote add data $(EOS_GIT_REPOSITRY_DATA_NOUSER); \
282- else \
283- git remote add data $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_DATA); \
284- fi ;
275+ cd data; \
276+ if [ ! -d .git ] ; then git init ; fi ;
277+ @export ORIGINNAME=data; \
278+ make git-remote-add-data;
285279
286280 git-init-optional::
287281 if [ ! -d optional ] ; then mkdir optional; fi
288282 if [ ! -L doc ] ; then ln -sf optional/doc . ; fi
289283 if [ ! -L objects ] ; then ln -sf optional/objects . ; fi
290- cd optional; SSS=`git remote -v | grep optional`; if [ ! -z "$$SSS" ] ; then git remote rm optional ; fi ; \
291- if [ -z $${EOS_GITUSER} ] ; then \
292- git remote add optional $(EOS_GIT_REPOSITRY_OPTIONAL_NOUSER); \
293- else \
294- git remote add optional $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OPTIONAL); \
295- fi ;
284+ cd optional; \
285+ if [ ! -d .git ] ; then git init ; fi ;
286+ @export ORIGINNAME=optional; \
287+ make git-remote-add-optional;
296288
297289 git-init-tutorial::
298290 if [ ! -d tutorial ] ; then mkdir tutorial ; fi
299- cd tutorial; SSS=`git remote -v | grep tutorial`; if [ ! -z "$$SSS" ] ; then git remote rm tutorial ; fi ; \
300- if [ -z $${EOS_GITUSER} ] ; then \
301- git remote add tutorial $(EOS_GIT_REPOSITRY_TUTORIAL_NOUSER); \
302- else \
303- git remote add tutorial $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_TUTORIAL); \
304- fi ;
291+ cd tutorial; \
292+ if [ ! -d .git ] ; then git init ; fi ;
293+ @export ORIGINNAME=tutorial; \
294+ make git-remote-add-tutorial;
305295
306296 git-init-others::
307297 if [ ! -d others ] ; then mkdir others; fi
308- cd others ; SSS=`git remote -v | grep others`; if [ ! -z "$$SSS" ] ; then git remote rm others ; fi ; \
309- if [ -z $${EOS_GITUSER} ] ; then \
310- git remote add others $(EOS_GIT_REPOSITRY_OTHERS_NOUSER); \
311- else \
312- git remote add others $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS); \
313- fi ;
298+ cd others ; \
299+ if [ ! -d .git ] ; then git init ; fi ;
300+ @export ORIGINNAME=others; \
301+ make git-remote-add-others;
314302
315303 git-init-others2::
316304 if [ ! -d others2 ] ; then mkdir others2; fi
317305 cd others2 ; git remote add others2 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS)
318306
319-git-clone-all:: git-clone git-clone-data git-clone-optional git-clone-tutorial git-clone-others
307+git-clone-all:: git-clone
308+ @if [ ! -z "$${EOS_HOME}" -a -d "$${EOS_HOME}" ] ; then \
309+ cd $${EOS_HOME} ; \
310+ make git-clone-data git-clone-optional git-clone-tutorial git-clone-others; \
311+ fi;
320312
321-git-clone:git-init
322- if [ ! -d .git ] ; \
323- then \
324- if [ -z $${EOS_GITUSER} ] ; then \
325- git clone --depth 1 $(EOS_GIT_REPOSITRY_NOUSER) ./ ; \
326- else \
327- git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY) ./ ; \
328- fi ; \
329- fi
313+git-clone::
314+ @if [ ! -z "$${EOS_HOME}" -a -d "$${EOS_HOME}" ] ; then \
315+ TMPDIRECTORY=$$(pwd) ; \
316+ cd $${EOS_HOME} ; \
317+ if [ ! -d .git ] ; \
318+ then \
319+ if [ -z $${EOS_GITUSER} ] ; then \
320+ git clone --depth 1 $(EOS_GIT_REPOSITRY_NOUSER) ./ ; \
321+ else \
322+ git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY) ./ ; \
323+ fi ; \
324+ cd $${TMPDIRECTORY}; \
325+ export ORIGINNAME=origin; \
326+ make git-remote-add; \
327+ fi; \
328+ fi;
330329
331-git-clone-data: git-init-data
332- cd data; if [ ! -d .git ] ; \
330+git-clone-data::
331+ if [ ! -d data ] ; then mkdir data; fi
332+ @cd data; if [ ! -d .git ] ; \
333333 then \
334334 if [ -z $${EOS_GITUSER} ] ; then \
335335 git clone --depth 1 $(EOS_GIT_REPOSITRY_DATA_NOUSER) ./ ; \
336336 else \
337337 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_DATA) ./; \
338338 fi ; \
339+ cd ../ ; \
340+ export ORIGINNAME=data; \
341+ make git-remote-add-data; \
339342 fi
340343
341-git-clone-optional: git-init-optional
342- cd optional; if [ ! -d .git ] ; \
344+git-clone-optional::
345+ if [ ! -d optional ] ; then mkdir optional; fi
346+ if [ ! -L doc ] ; then ln -sf optional/doc . ; fi
347+ if [ ! -L objects ] ; then ln -sf optional/objects . ; fi
348+ @cd optional; if [ ! -d .git ] ; \
343349 then \
344350 if [ -z $${EOS_GITUSER} ] ; then \
345351 git clone --depth 1 $(EOS_GIT_REPOSITRY_OPTIONAL_NOUSER) ./ ; \
346352 else \
347353 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OPTIONAL) ./ ; \
348354 fi ; \
355+ cd ../ ; \
356+ export ORIGINNAME=optional; \
357+ make git-remote-add-optional; \
349358 fi
350359
351-git-clone-tutorial: git-init-tutorial
352- cd tutorial; if [ ! -d .git ] ; \
360+git-clone-tutorial::
361+ if [ ! -d tutorial ] ; then mkdir tutorial ; fi
362+ @cd tutorial; if [ ! -d .git ] ; \
353363 then \
354364 if [ -z $${EOS_GITUSER} ] ; then \
355365 git clone --depth 1 $(EOS_GIT_REPOSITRY_TUTORIAL_NOUSER) ./ ; \
356366 else \
357367 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_TUTORIAL) ./ ; \
358368 fi; \
369+ cd ../ ; \
370+ export ORIGINNAME=tutorial; \
371+ make git-remote-add-tutorial; \
359372 fi
360373
361-git-clone-others: git-init-others
362- cd others ; if [ ! -d .git ] ; \
374+git-clone-others::
375+ if [ ! -d others ] ; then mkdir others; fi
376+ @cd others ; if [ ! -d .git ] ; \
363377 then \
364378 if [ -z $${EOS_GITUSER} ] ; then \
365379 git clone --depth 1 $(EOS_GIT_REPOSITRY_OTHERS_NOUSER) ./ ; \
366380 else \
367381 git clone --depth 1 $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS) ./ ; \
368382 fi; \
383+ cd ../ ; \
384+ export ORIGINNAME=others; \
385+ make git-remote-add-others; \
369386 fi
370387
388+git-remote-add::
389+ @if [ ! -z "$$ORIGINNAME" -a ! -z "$${EOS_HOME}" -a -d "$${EOS_HOME}" ]; then \
390+ cd $${EOS_HOME}; \
391+ SSS=`git remote -v | awk '{print $$1}' | grep origin`; if [ ! -z "$$SSS" ] ; then git remote rm origin ; fi ; \
392+ if [ -z $${EOS_GITUSER} ] ; then \
393+ git remote add origin $(EOS_GIT_REPOSITRY_NOUSER); \
394+ else \
395+ git remote add origin $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY); \
396+ fi ; \
397+ fi;
398+
399+git-remote-add-data::
400+ @if [ ! -z "$$ORIGINNAME" ]; then \
401+ cd $$ORIGINNAME; \
402+ SSS=`git remote -v | awk '{print $$1}' | grep data`; if [ ! -z "$$SSS" ] ; then git remote rm data ; fi ; \
403+ if [ -z $${EOS_GITUSER} ] ; then \
404+ git remote add data $(EOS_GIT_REPOSITRY_DATA_NOUSER); \
405+ else \
406+ git remote add data $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_DATA); \
407+ fi ; \
408+ fi;
409+
410+git-remote-add-optional::
411+ @if [ ! -z "$$ORIGINNAME" ]; then \
412+ cd $$ORIGINNAME; \
413+ SSS=`git remote -v | awk '{print $$1}' | grep optional`; if [ ! -z "$$SSS" ] ; then git remote rm optional ; fi ; \
414+ if [ -z $${EOS_GITUSER} ] ; then \
415+ git remote add optional $(EOS_GIT_REPOSITRY_OPTIONAL_NOUSER); \
416+ else \
417+ git remote add optional $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OPTIONAL); \
418+ fi ; \
419+ fi;
371420
421+git-remote-add-tutorial::
422+ @if [ ! -z "$$ORIGINNAME" ]; then \
423+ cd $$ORIGINNAME; \
424+ SSS=`git remote -v | awk '{print $$1}' | grep tutorial`; if [ ! -z "$$SSS" ] ; then git remote rm tutorial ; fi ; \
425+ if [ -z $${EOS_GITUSER} ] ; then \
426+ git remote add tutorial $(EOS_GIT_REPOSITRY_TUTORIAL_NOUSER); \
427+ else \
428+ git remote add tutorial $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_TUTORIAL); \
429+ fi ; \
430+ fi;
431+
432+git-remote-add-others::
433+ @if [ ! -z "$$ORIGINNAME" ]; then \
434+ cd $$ORIGINNAME; \
435+ SSS=`git remote -v | awk '{print $$1}' | grep others`; if [ ! -z "$$SSS" ] ; then git remote rm others ; fi ; \
436+ if [ -z $${EOS_GITUSER} ] ; then \
437+ git remote add others $(EOS_GIT_REPOSITRY_OTHERS_NOUSER); \
438+ else \
439+ git remote add others $${EOS_GITUSER}@$(EOS_GIT_REPOSITRY_OTHERS); \
440+ fi ; \
441+ fi;
Show on old repository browser