Browse code

Added a new script phase did-install.sh, which is run after everything has been fetched for each installed repo. The semantics are a bit bewildering depending if the script is called during .bootstrap recursion or not. (It's placed in .bootstrap/settings/bin)

Nat! authored on 08-10-2015 15:23:32
Showing 3 changed files
... ...
@@ -10,3 +10,7 @@
10 10
 
11 11
    Lots of en-passant bug fixes. Should be in general better than 0.5
12 12
 
13
+   Add -V option.
14
+
15
+   Added new did-install script phase. Depending on actual usage, I'll
16
+   probably ditch some of the other phases again. This is all in flux.
13 17
\ No newline at end of file
... ...
@@ -94,6 +94,172 @@ fi
94 94
 check_and_usage_and_help
95 95
 
96 96
 
97
+#
98
+# Use brews for stuff we don't tag
99
+#
100
+install_taps()
101
+{
102
+   local tap
103
+   local taps
104
+   local old
105
+
106
+   log_fluff "Looking for taps"
107
+
108
+   taps=`read_fetch_setting "taps" | sort | sort -u`
109
+   if [ "${taps}" != "" ]
110
+   then
111
+      local old
112
+
113
+      fetch_brew_if_needed
114
+
115
+      old="${IFS:-" "}"
116
+      IFS="
117
+"
118
+      for tap in ${taps}
119
+      do
120
+         exekutor brew tap "${tap}" > /dev/null || exit 1
121
+      done
122
+   else
123
+      log_fluff "No taps found"
124
+   fi
125
+}
126
+
127
+
128
+install_brews()
129
+{
130
+   local brew
131
+   local brews
132
+
133
+   install_taps
134
+
135
+   log_fluff "Looking for brews"
136
+
137
+   brews=`read_fetch_setting "brews" | sort | sort -u`
138
+   if [ "${brews}" != "" ]
139
+   then
140
+      local old
141
+
142
+      old="${IFS:-" "}"
143
+      IFS="
144
+"
145
+      for brew in ${brews}
146
+      do
147
+         if [ "`which "${brew}"`" = "" ]
148
+         then
149
+            brew_update_if_needed "${brew}"
150
+
151
+            log_fluff "brew ${COMMAND} \"${brew}\""
152
+            exekutor brew "${COMMAND}" "${brew}" || exit 1
153
+         else
154
+            log_info "\"${brew}\" is already installed."
155
+         fi
156
+      done
157
+      IFS="${old}"
158
+   else
159
+      log_fluff "No brews found"
160
+   fi
161
+}
162
+
163
+
164
+#
165
+# future, download tarballs...
166
+#
167
+check_tars()
168
+{
169
+   local tarballs
170
+   local tar
171
+
172
+   log_fluff "Looking for tarballs"
173
+
174
+   tarballs="`read_fetch_setting "tarballs" | sort | sort -u`"
175
+   if [ "${tarballs}" != "" ]
176
+   then
177
+      local old
178
+
179
+      old="${IFS:-" "}"
180
+      IFS="
181
+"
182
+      for tar in ${tarballs}
183
+      do
184
+         if [ ! -f "$tar" ]
185
+         then
186
+            fail "tarball \"$tar\" not found"
187
+         fi
188
+         log_fluff "tarball \"$tar\" found"
189
+      done
190
+      IFS="${old}"
191
+   else
192
+      log_fluff "No tarballs found"
193
+   fi
194
+}
195
+
196
+
197
+#
198
+# Use gems for stuff we don't tag
199
+#
200
+install_gems()
201
+{
202
+   local gems
203
+   local gem
204
+
205
+   log_fluff "Looking for gems"
206
+
207
+   gems="`read_fetch_setting "gems" | sort | sort -u`"
208
+   if [ "${gems}" != "" ]
209
+   then
210
+      local old
211
+
212
+      old="${IFS:-" "}"
213
+      IFS="
214
+"
215
+      for gem in ${gems}
216
+      do
217
+         log_fluff "gem install \"${gem}\""
218
+
219
+         echo "gem needs sudo to install ${gem}" >&2
220
+         exekutor sudo gem install "${gem}" || exit 1
221
+      done
222
+      IFS="${old}"
223
+   else
224
+      log_fluff "No gems found"
225
+   fi
226
+}
227
+
228
+
229
+#
230
+# Use pips for stuff we don't tag
231
+#
232
+install_pips()
233
+{
234
+   local pips
235
+   local pip
236
+
237
+   log_fluff "Looking for pips"
238
+
239
+   pips="`read_fetch_setting "pips" | sort | sort -u`"
240
+   if [ "${pips}" != "" ]
241
+   then
242
+      local old
243
+
244
+      old="${IFS:-" "}"
245
+      IFS="
246
+"
247
+      for pip in ${pips}
248
+      do
249
+         log_fluff "pip install \"${gem}\""
250
+
251
+         echo "pip needs sudo to install ${pip}" >&2
252
+         exekutor sudo pip install "${pip}" || exit 1
253
+      done
254
+      IFS="${old}"
255
+   else
256
+      log_fluff "No pips found"
257
+   fi
258
+}
259
+
260
+#
261
+###
262
+#
97 263
 link_command()
98 264
 {
99 265
    local src
... ...
@@ -174,115 +340,6 @@ ask_symlink_it()
174 340
 }
175 341
 
176 342
 
177
-
178
-checkout()
179
-{
180
-   local clone
181
-   local name1
182
-   local tag
183
-   local dstname
184
-
185
-   clone="$1"
186
-   name1="$2"
187
-   dstname="$3"
188
-   tag="$4"
189
-
190
-   [ -z "$clone" ]    && internal_fail "clone is empty"
191
-   [ -z "$name1" ]    && internal_fail "name1 is empty"
192
-   [ -z "$dstname" ]  && internal_fail "dstname is empty"
193
-
194
-   local srcname
195
-   local operation
196
-   local flag
197
-   local found
198
-   local name2
199
-
200
-   name2="`basename "${clone}"`"
201
-
202
-   #
203
-   # this implicitly ensures, that these folders are
204
-   # movable and cleanable by mulle-bootstrap
205
-   # so ppl can't really use  src mistakenly
206
-
207
-   if [ -e "${DEPENDENCY_SUBDIR}" -o -e "${CLONESBUILD_SUBDIR}" ]
208
-   then
209
-      log_error "Stale folders ${DEPENDENCY_SUBDIR} and/or ${CLONESBUILD_SUBDIR} found."
210
-      log_error "Please remove them before continuing."
211
-      log_info  "Suggested command: ${C_WHITE}mulle-bootstrap clean output"
212
-      exit 1
213
-   fi
214
-
215
-   srcname="${clone}"
216
-   script="`find_repo_setting_file "${name1}" "bin/${COMMAND}.sh"`"
217
-   operation="git_clone"
218
-
219
-   # simplify this crap copy/paste code
220
-   if [ ! -z "${script}" ]
221
-   then
222
-      run_script "${script}" "$@"
223
-   else
224
-      case "${clone}" in
225
-         /*)
226
-            ask_symlink_it "${clone}"
227
-            if [ $? -eq 0 ]
228
-            then
229
-               operation=link_command
230
-            fi
231
-         ;;
232
-
233
-         ../*|./*)
234
-            ask_symlink_it "${clone}"
235
-            if [ $? -eq 0 ]
236
-            then
237
-               operation=link_command
238
-               srcname="${CLONES_RELATIVE}/${clone}"
239
-            fi
240
-         ;;
241
-
242
-         *)
243
-            found="../${name1}.${tag}"
244
-            if [ ! -d "${found}" ]
245
-            then
246
-               found="../${name1}"
247
-               if [ ! -d "${found}" ]
248
-               then
249
-                  found="../${name2}.${tag}"
250
-                  if [ ! -d "${found}" ]
251
-                  then
252
-                     found="../${name2}"
253
-                     if [ ! -d "${found}" ]
254
-                     then
255
-                        found=""
256
-                     fi
257
-                  fi
258
-               fi
259
-            fi
260
-
261
-            if [ "${found}" != ""  ]
262
-            then
263
-               user_say_yes "There is a ${found} folder in the parent
264
-directory of this project.
265
-Use it ?"
266
-               if [ $? -eq 0 ]
267
-               then
268
-                  srcname="${found}"
269
-                  ask_symlink_it "${srcname}"
270
-                  if [ $? -eq 0 ]
271
-                  then
272
-                     operation=link_command
273
-                     srcname="${CLONES_RELATIVE}/${found}"
274
-                  fi
275
-               fi
276
-            fi
277
-         ;;
278
-      esac
279
-
280
-      "${operation}" "${srcname}" "${dstname}" "${tag}"
281
-       warn_scripts "${dstname}/.bootstrap" "${dstname}" || exit 1 # sic
282
-   fi
283
-}
284
-
285
-
286 343
 git_checkout_tag()
287 344
 {
288 345
    local dst
... ...
@@ -353,7 +410,7 @@ git_pull()
353 410
 INHERIT_SETTINGS="taps brews gits pips gems settings/build_order settings/build_ignore"
354 411
 
355 412
 
356
-bootstrap_recurse()
413
+bootstrap_auto_update()
357 414
 {
358 415
    local dst
359 416
    local name
... ...
@@ -377,7 +434,7 @@ bootstrap_recurse()
377 434
    # prepare auto folder if it doesn't exist yet
378 435
    if [ ! -d "${BOOTSTRAP_SUBDIR}.auto" ]
379 436
    then
380
-      echo "Found a .bootstrap folder for `basename "${dst}"` will set up ${BOOTSTRAP_SUBDIR}.auto" >&2
437
+      log_info "Found a .bootstrap folder for `basename "${dst}"` will set up ${BOOTSTRAP_SUBDIR}.auto"
381 438
 
382 439
       mkdir_if_missing "${BOOTSTRAP_SUBDIR}.auto/settings"
383 440
       for i in $INHERIT_SETTINGS
... ...
@@ -451,7 +508,6 @@ bootstrap_recurse()
451 508
          exekutor xargs -0 -I % ln -s "${relative}/../"% "${BOOTSTRAP_SUBDIR}.auto/settings"
452 509
    fi
453 510
 
454
-
455 511
    return 0
456 512
 }
457 513
 
... ...
@@ -517,18 +573,126 @@ log_fetch_action()
517 573
    clone="$1"
518 574
    dstname="$2"
519 575
 
520
-   local info
576
+   local info
577
+
578
+   if [ -L "${clone}" ]
579
+   then
580
+      info=" symlinked "
581
+   else
582
+      info=" "
583
+   fi
584
+
585
+   log_fluff "Perform ${COMMAND}${info}${clone} in ${dstname} ..."
586
+}
587
+
588
+
589
+checkout()
590
+{
591
+   local clone
592
+   local name
593
+   local tag
594
+   local dstname
595
+
596
+   clone="$1"
597
+   name="$2"
598
+   dstname="$3"
599
+   tag="$4"
600
+
601
+   [ ! -z "$clone" ]   || internal_fail "clone is empty"
602
+   [ ! -z "$name" ]    || internal_fail "name is empty"
603
+   [ ! -z "$dstname" ] || internal_fail "dstname is empty"
604
+
605
+   local srcname
606
+   local operation
607
+   local flag
608
+   local found
609
+   local name2
610
+
611
+   name2="`basename "${clone}"`"
612
+
613
+   #
614
+   # this implicitly ensures, that these folders are
615
+   # movable and cleanable by mulle-bootstrap
616
+   # so ppl can't really use  src mistakenly
617
+
618
+   if [ -e "${DEPENDENCY_SUBDIR}" -o -e "${CLONESBUILD_SUBDIR}" ]
619
+   then
620
+      log_error "Stale folders ${DEPENDENCY_SUBDIR} and/or ${CLONESBUILD_SUBDIR} found."
621
+      log_error "Please remove them before continuing."
622
+      log_info  "Suggested command: ${C_WHITE}mulle-bootstrap clean output"
623
+      exit 1
624
+   fi
625
+
626
+   srcname="${clone}"
627
+   script="`find_repo_setting_file "${name}" "bin/${COMMAND}.sh"`"
628
+   operation="git_clone"
629
+
630
+   if [ ! -z "${script}" ]
631
+   then
632
+      run_script "${script}" "$@"
633
+   else
634
+      case "${clone}" in
635
+         /*)
636
+            ask_symlink_it "${clone}"
637
+            if [ $? -eq 0 ]
638
+            then
639
+               operation=link_command
640
+            fi
641
+         ;;
642
+
643
+         ../*|./*)
644
+            ask_symlink_it "${clone}"
645
+            if [ $? -eq 0 ]
646
+            then
647
+               operation=link_command
648
+               srcname="${CLONES_RELATIVE}/${clone}"
649
+            fi
650
+         ;;
651
+
652
+         *)
653
+            found="../${name}.${tag}"
654
+            if [ ! -d "${found}" ]
655
+            then
656
+               found="../${name}"
657
+               if [ ! -d "${found}" ]
658
+               then
659
+                  found="../${name2}.${tag}"
660
+                  if [ ! -d "${found}" ]
661
+                  then
662
+                     found="../${name2}"
663
+                     if [ ! -d "${found}" ]
664
+                     then
665
+                        found=""
666
+                     fi
667
+                  fi
668
+               fi
669
+            fi
670
+
671
+            if [ "${found}" != ""  ]
672
+            then
673
+               user_say_yes "There is a ${found} folder in the parent
674
+directory of this project.
675
+Use it ?"
676
+               if [ $? -eq 0 ]
677
+               then
678
+                  srcname="${found}"
679
+                  ask_symlink_it "${srcname}"
680
+                  if [ $? -eq 0 ]
681
+                  then
682
+                     operation=link_command
683
+                     srcname="${CLONES_RELATIVE}/${found}"
684
+                  fi
685
+               fi
686
+            fi
687
+         ;;
688
+      esac
521 689
 
522
-   if [ -L "${clone}" ]
523
-   then
524
-      info=" symlinked "
525
-   else
526
-      info=" "
690
+      "${operation}" "${srcname}" "${dstname}" "${tag}"
691
+       warn_scripts "${dstname}/.bootstrap" "${dstname}" || exit 1 # sic
527 692
    fi
528
-
529
-   log_fluff "Perform ${COMMAND}${info}${clone} in ${dstname} ..."
530 693
 }
531 694
 
695
+
532 696
 #
533 697
 # Use git clones for stuff that gets tagged
534 698
 # if you specify ../ it will assume you have
... ...
@@ -541,6 +705,7 @@ checkout_repository()
541 705
 {
542 706
    local dstname
543 707
    local name
708
+   local flag
544 709
 
545 710
    name="$2"
546 711
    dstname="$3"
... ...
@@ -548,17 +713,22 @@ checkout_repository()
548 713
    if [ ! -e "${dstname}" ]
549 714
    then
550 715
       checkout "$@"
716
+      flag=1
551 717
 
552 718
       if [ "${COMMAND}" = "install" -a "${DONT_RECURSE}" = "" ]
553 719
       then
554
-         bootstrap_recurse "${dstname}"
555
-         if [ $? -eq 0 ]
556
-         then
557
-            return 1
558
-         fi
720
+         bootstrap_auto_update "${dstname}"
721
+         flag=$?
722
+      fi
723
+
724
+      run_build_settings_script "${dstname}" "${name}" "post-${COMMAND}" "$@"
725
+
726
+      # means we recursed and should start fetch from top
727
+      if [ ${flag} -eq 0 ]
728
+      then
729
+         return 1
559 730
       fi
560 731
 
561
-      run_repo_settings_script "${dstname}" "${name}" "post-${COMMAND}" "$@"
562 732
    else
563 733
       log_fluff "Repository \"${dstname}\" already exists"
564 734
    fi
... ...
@@ -578,9 +748,7 @@ clone_repository()
578 748
 
579 749
    name="`basename "${clone}" .git`"
580 750
    tag="`read_repo_setting "${name}" "tag"`" #repo (sic)
581
-
582 751
    dstname="${CLONES_FETCH_SUBDIR}/${name}"
583
-
584 752
    mark_alive "${dstname}"
585 753
    log_fetch_action "${name}" "${dstname}"
586 754
 
... ...
@@ -588,15 +756,24 @@ clone_repository()
588 756
 }
589 757
 
590 758
 
591
-clone_repositories()
759
+did_clone_repository()
592 760
 {
593
-   if [ $# -ne 0 ]
594
-   then
595
-      log_error  "Additional parameters not allowed for install"
596
-      usage >&2
597
-      exit 1
598
-   fi
761
+   local clone
762
+
763
+   clone="$1"
599 764
 
765
+   local name
766
+   local dstname
767
+
768
+   name="`basename "${clone}" .git`"
769
+   dstname="${CLONES_FETCH_SUBDIR}/${name}"
770
+
771
+   run_build_settings_script "${dstname}" "${name}" "did-install" "${dstname}" "${name}"
772
+}
773
+
774
+
775
+clone_repositories()
776
+{
600 777
    local stop
601 778
    local clones
602 779
    local clone
... ...
@@ -624,31 +801,37 @@ clone_repositories()
624 801
          done
625 802
       fi
626 803
    done
804
+
805
+   clones="`read_fetch_setting "gits"`"
806
+   for clone in ${clones}
807
+   do
808
+      did_clone_repository "${clone}"
809
+   done
627 810
 }
628 811
 
629 812
 
630 813
 update()
631 814
 {
632
-   local clonedir
815
+   local clone
633 816
    local name
634 817
    local tag
635 818
    local dstname
636 819
 
637
-   clonedir="$1"
820
+   clone="$1"
638 821
    name="$2"
639 822
    dstname="$3"
640 823
    tag="$4"
641 824
 
642
-   [ -d "$clonedir" ]   || internal_fail "clonedir \"${clonedir}\" is wrong ($PWD)"
643
-   [ ! -z "$name" ]     || internal_fail "name is empty"
644
-   [ ! -z "$dstname" ]  ||internal_fail "dstname is empty"
825
+   [ ! -z "$clone" ] ||internal_fail "clone is empty"
826
+   [ -d "$dstname" ] || internal_fail "dstname \"${dstname}\" is wrong ($PWD)"
827
+   [ ! -z "$name" ]  || internal_fail "name is empty"
645 828
 
646 829
    local script
647 830
 
648 831
    log_info "Updating \"${dstname}\""
649 832
    if [ ! -L "${dstname}"  ]
650 833
    then
651
-      run_repo_settings_script "${clonedir}" "${name}" "pre-update" "%@"
834
+      run_repo_settings_script "${clone}" "${name}" "pre-update" "%@"
652 835
 
653 836
       script="`find_repo_setting_file "${name}" "bin/update.sh"`"
654 837
       if [ ! -z "${script}" ]
... ...
@@ -658,31 +841,47 @@ update()
658 841
          exekutor git_pull "${dstname}" "${tag}"
659 842
       fi
660 843
 
661
-      run_repo_settings_script "${clonedir}"  "${name}" "post-update" "%@"
844
+      run_repo_settings_script "${clone}" "${name}" "post-update" "%@"
662 845
    fi
663 846
 }
664 847
 
665 848
 
666 849
 update_repository()
667 850
 {
668
-   local clonedir
851
+   local clone
669 852
 
670
-   clonedir="$1"
853
+   clone="$1"
671 854
 
672 855
    local name
673 856
    local tag
674 857
    local dstname
675 858
 
676
-   name="`basename "${clonedir}" .git`"
859
+   name="`basename "${clone}" .git`"
677 860
    tag="`read_repo_setting "${name}" "tag"`" #repo (sic)
678 861
 
679 862
    dstname="${CLONES_FETCH_SUBDIR}/${name}"
680 863
    exekutor [ -e "${dstname}" ] || fail "You need to install first, before updating"
681 864
    exekutor [ -x "${dstname}" ] || fail "${name} is not anymore in \"gits\""
682 865
 
683
-   log_fetch_action "${clonedir}" "${dstname}"
866
+   log_fetch_action "${clone}" "${dstname}"
867
+
868
+   update "${clone}" "${name}" "${dstname}" "${tag}"
869
+}
870
+
871
+
872
+did_update_repository()
873
+{
874
+   local clone
875
+
876
+   clone="$1"
877
+
878
+   local name
879
+   local dstname
880
+
881
+   name="`basename "${clone}" .git`"
882
+   dstname="${CLONES_FETCH_SUBDIR}/${name}"
684 883
 
685
-   update "${clonedir}" "${name}" "${dstname}" "${tag}"
884
+   run_build_settings_script "${dstname}" "${name}" "did-update" "${dstname}" "${name}"
686 885
 }
687 886
 
688 887
 
... ...
@@ -698,13 +897,19 @@ update_repositories()
698 897
 {
699 898
    local clones
700 899
    local clone
900
+   local name
701 901
    local i
702 902
 
703 903
    if [ $# -ne 0 ]
704 904
    then
705
-      for clone in "$@"
905
+      for name in "$@"
906
+      do
907
+         update_repository "${name}"
908
+      done
909
+
910
+      for name in "$@"
706 911
       do
707
-         update_repository "${CLONES_FETCH_SUBDIR}/${clone}"
912
+         did_update_repository "${name}"
708 913
       done
709 914
    else
710 915
       clones="`read_fetch_setting "gits"`"
... ...
@@ -714,171 +919,14 @@ update_repositories()
714 919
          do
715 920
             update_repository "${clone}"
716 921
          done
717
-      fi
718
-   fi
719
-}
720
-
721
-
722
-#
723
-# Use brews for stuff we don't tag
724
-#
725
-install_taps()
726
-{
727
-   local tap
728
-   local taps
729
-   local old
730
-
731
-   log_fluff "Looking for taps"
732
-
733
-   taps=`read_fetch_setting "taps" | sort | sort -u`
734
-   if [ "${taps}" != "" ]
735
-   then
736
-      local old
737
-
738
-      fetch_brew_if_needed
739
-
740
-      old="${IFS:-" "}"
741
-      IFS="
742
-"
743
-      for tap in ${taps}
744
-      do
745
-         exekutor brew tap "${tap}" > /dev/null || exit 1
746
-      done
747
-   else
748
-      log_fluff "No taps found"
749
-   fi
750
-}
751
-
752
-
753
-install_brews()
754
-{
755
-   local brew
756
-   local brews
757
-
758
-   install_taps
759
-
760
-   log_fluff "Looking for brews"
761
-
762
-   brews=`read_fetch_setting "brews" | sort | sort -u`
763
-   if [ "${brews}" != "" ]
764
-   then
765
-      local old
766
-
767
-      old="${IFS:-" "}"
768
-      IFS="
769
-"
770
-      for brew in ${brews}
771
-      do
772
-         if [ "`which "${brew}"`" = "" ]
773
-         then
774
-            brew_update_if_needed "${brew}"
775
-
776
-            log_fluff "brew ${COMMAND} \"${brew}\""
777
-            exekutor brew "${COMMAND}" "${brew}" || exit 1
778
-         else
779
-            log_info "\"${brew}\" is already installed."
780
-         fi
781
-      done
782
-      IFS="${old}"
783
-   else
784
-      log_fluff "No brews found"
785
-   fi
786
-}
787
-
788
-
789
-#
790
-# future, download tarballs...
791
-#
792
-check_tars()
793
-{
794
-   local tarballs
795
-   local tar
796
-
797
-   log_fluff "Looking for tarballs"
798
-
799
-   tarballs="`read_fetch_setting "tarballs" | sort | sort -u`"
800
-   if [ "${tarballs}" != "" ]
801
-   then
802
-      local old
803
-
804
-      old="${IFS:-" "}"
805
-      IFS="
806
-"
807
-      for tar in ${tarballs}
808
-      do
809
-         if [ ! -f "$tar" ]
810
-         then
811
-            fail "tarball \"$tar\" not found"
812
-         fi
813
-         log_fluff "tarball \"$tar\" found"
814
-      done
815
-      IFS="${old}"
816
-   else
817
-      log_fluff "No tarballs found"
818
-   fi
819
-}
820
-
821
-
822
-#
823
-# Use gems for stuff we don't tag
824
-#
825
-install_gems()
826
-{
827
-   local gems
828
-   local gem
829
-
830
-   log_fluff "Looking for gems"
831
-
832
-   gems="`read_fetch_setting "gems" | sort | sort -u`"
833
-   if [ "${gems}" != "" ]
834
-   then
835
-      local old
836
-
837
-      old="${IFS:-" "}"
838
-      IFS="
839
-"
840
-      for gem in ${gems}
841
-      do
842
-         log_fluff "gem install \"${gem}\""
843
-
844
-         echo "gem needs sudo to install ${gem}" >&2
845
-         exekutor sudo gem install "${gem}" || exit 1
846
-      done
847
-      IFS="${old}"
848
-   else
849
-      log_fluff "No gems found"
850
-   fi
851
-}
852
-
853
-
854
-#
855
-# Use pips for stuff we don't tag
856
-#
857
-install_pips()
858
-{
859
-   local pips
860
-   local pip
861
-
862
-   log_fluff "Looking for pips"
863
-
864
-   pips="`read_fetch_setting "pips" | sort | sort -u`"
865
-   if [ "${pips}" != "" ]
866
-   then
867
-      local old
868
-
869
-      old="${IFS:-" "}"
870
-      IFS="
871
-"
872
-      for pip in ${pips}
873
-      do
874
-         log_fluff "pip install \"${gem}\""
875 922
 
876
-         echo "pip needs sudo to install ${pip}" >&2
877
-         exekutor sudo pip install "${pip}" || exit 1
878
-      done
879
-      IFS="${old}"
880
-   else
881
-      log_fluff "No pips found"
923
+         # reread because of auto
924
+         clones="`read_fetch_setting "gits"`"
925
+         for clone in ${clones}
926
+         do
927
+            did_update_repository "${clone}"
928
+         done
929
+      fi
882 930
    fi
883 931
 }
884 932
 
... ...
@@ -892,7 +940,14 @@ main()
892 940
    #
893 941
    if [ "${COMMAND}" = "install" ]
894 942
    then
895
-      clone_repositories "$@"
943
+      if [ $# -ne 0 ]
944
+      then
945
+         log_error  "Additional parameters not allowed for install"
946
+         usage >&2
947
+         exit 1
948
+      fi
949
+
950
+      clone_repositories
896 951
 
897 952
       install_brews
898 953
       install_gems
... ...
@@ -130,15 +130,15 @@ run_build_root_settings_script()
130 130
 # run in subshell
131 131
 run_fake_environment_script()
132 132
 {
133
-   local clonedir
133
+   local dstname
134 134
    local script
135 135
 
136
-   clonedir="$1"
136
+   dstname="$1"
137 137
    shift
138 138
    script="$1"
139 139
    shift
140 140
 
141
-   ( owd="`pwd -P`"; cd "${clonedir}" ;
141
+   ( owd="`pwd -P`"; cd "${dstname}" ;
142 142
    CLONES_SUBDIR="${owd}/${CLONES_SUBDIR}" \
143 143
    CLONESBUILD_SUBDIR="${owd}/${CLONESBUILD_SUBDIR}" \
144 144
    DEPENDENCY_SUBDIR="${owd}/${DEPENDENCY_SUBDIR}" \
... ...
@@ -151,16 +151,16 @@ run_repo_settings_script()
151 151
 {
152 152
    local name
153 153
    local scriptname
154
-   local clonedir
154
+   local dstname
155 155
 
156
-   clonedir="$1"
156
+   dstname="$1"
157 157
    shift
158 158
    name="$1"
159 159
    shift
160 160
    scriptname="$1"
161 161
    shift
162 162
 
163
-   [ -d "$clonedir" ]     || internal_fail "clonedir \"${clonedir}\" is wrong ($PWD)"
163
+   [ -d "$dstname" ]      || internal_fail "dstname \"${dstname}\" is wrong ($PWD)"
164 164
    [ ! -z "$name" ]       || internal_fail "name is empty"
165 165
    [ ! -z "$scriptname" ] || internal_fail "scriptname is empty"
166 166
 
... ...
@@ -169,7 +169,34 @@ run_repo_settings_script()
169 169
    script="`find_repo_setting_file "${name}" "bin/${scriptname}.sh"`"
170 170
    if [ ! -z "${script}" ]
171 171
    then
172
-      run_fake_environment_script "${clonedir}" "${script}" "$@" || exit 1
172
+      run_fake_environment_script "${dstname}" "${script}" "$@" || exit 1
173
+   fi
174
+}
175
+
176
+
177
+run_build_settings_script()
178
+{
179
+   local dstname
180
+   local name
181
+   local scriptname
182
+
183
+   dstname="$1"
184
+   shift
185
+   name="$1"
186
+   shift
187
+   scriptname="$1"
188
+   shift
189
+
190
+   [ -d "$dstname" ]      || internal_fail "dstname \"${dstname}\" is wrong ($PWD)"
191
+   [ ! -z "$name" ]       || internal_fail "name is empty"
192
+   [ ! -z "$scriptname" ] || internal_fail "scriptname is empty"
193
+
194
+   local script
195
+
196
+   script="`find_build_setting_file "${name}" "bin/${scriptname}.sh"`"
197
+   if [ ! -z "${script}" ]
198
+   then
199
+      run_script "${script}" "$@" || exit 1
173 200
    fi
174 201
 }
175 202