Browse code

more control over mirroring experimental origin related expansions

Nat! authored on 18-06-2017 12:34:42
Showing 11 changed files
... ...
@@ -27,3 +27,54 @@ tests/*/f/
27 27
 tests/*/g/
28 28
 tests/*/h/
29 29
 mulle-mingw-cpp.exe
30
+tests/05-deep_embedded/log
31
+tests/05-deep_embedded/log1
32
+tests/05-deep_embedded/log2
33
+tests/07-embedded_symlink/checking
34
+tests/08-refresh/log
35
+tests/11-copy/a.tar
36
+tests/17-deep_embedded_environment/README.md
37
+tests/17-deep_embedded_environment/log
38
+tests/18-cmake/CMakeLists.txt
39
+tests/18-cmake/b.c
40
+tests/18-cmake/b.h
41
+tests/20-defer_embedded/Boobie/
42
+tests/20-defer_embedded/Foobie/
43
+tests/20-defer_embedded/Master/Minion/.bootstrap/embedded_repositories
44
+tests/20-defer_embedded/Master/Minion/.bootstrap/repositories
45
+tests/20-defer_embedded/Master/stashes/Foobie
46
+tests/20-defer_embedded/log
47
+tests/20-defer_embedded/log1
48
+tests/20-defer_embedded/log2
49
+tests/21-defer_advanced/Boobie/
50
+tests/21-defer_advanced/Foobie/
51
+tests/21-defer_advanced/Master/Minion/.bootstrap/embedded_repositories
52
+tests/21-defer_advanced/Master/Minion/.bootstrap/repositories
53
+tests/21-defer_advanced/Master/Minion/Boobie/
54
+tests/21-defer_advanced/Master/Minion2/.bootstrap/embedded_repositories
55
+tests/21-defer_advanced/Master/Minion2/.bootstrap/repositories
56
+tests/21-defer_advanced/Master/Minion2/Boobie/
57
+tests/21-defer_advanced/Master/stashes/Foobie
58
+tests/21-defer_advanced/README.md
59
+tests/21-defer_advanced/log
60
+tests/21-defer_advanced/log1
61
+tests/21-defer_advanced/log2
62
+tests/Boobie/
63
+tests/Foobie/
64
+tests/Master/Minion/.bootstrap/embedded_repositories
65
+tests/Master/Minion/.bootstrap/repositories
66
+tests/Master/Minion/Boobie/
67
+tests/Master/Minion2/.bootstrap/embedded_repositories
68
+tests/Master/Minion2/.bootstrap/repositories
69
+tests/Master/Minion2/Boobie/
70
+tests/Master/stashes/Foobie
71
+tests/a/b
72
+tests/a/c
73
+tests/b/
74
+tests/c/
75
+tests/d/
76
+tests/e/
77
+tests/f/
78
+tests/g/
79
+tests/h/
80
+package/
... ...
@@ -1,8 +1,23 @@
1
+### 3.7.0
2
+
3
+* experimentally added ${GITHUB_REMOTE_ORIGIN} expansion, so you can specify
4
+dependencies relative to the original project.
5
+* when moving embedded directories around, mulle-bootstrap will now create
6
+missing target directories
7
+* renamed `clone_cache` to `git_mirror` because that's better, but old key
8
+will work too. `refresh_cache` is now `refresh_git_mirror`.
9
+* added option `--no-git-mirror
10
+* added `type` command to introspect the bootstrap topology easier
11
+
12
+
13
+### 3.6.7
14
+
15
+* reduce verbosity in some places and hide ugly symlink paths
16
+
1 17
 ### 3.6.6
2 18
 
3 19
 * fix a few regressions
4 20
 
5
-
6 21
 ### 3.6.5
7 22
 
8 23
 * remove superflous set_build_needed
... ...
@@ -365,7 +380,6 @@ to
365 380
 
366 381
 * Fetch script names have changed. *-install.sh is now *-fetch.sh.
367 382
 
368
-
369 383
 #### Changes
370 384
 
371 385
 * Add pre-build.sh script phase (for libcurl really)
... ...
@@ -30,8 +30,8 @@
30 30
 #   POSSIBILITY OF SUCH DAMAGE.
31 31
 #
32 32
 MULLE_EXECUTABLE_VERSION_MAJOR=3
33
-MULLE_EXECUTABLE_VERSION_MINOR=6
34
-MULLE_EXECUTABLE_VERSION_PATCH=6
33
+MULLE_EXECUTABLE_VERSION_MINOR=7
34
+MULLE_EXECUTABLE_VERSION_PATCH=0
35 35
 
36 36
 MULLE_EXECUTABLE_VERSION="${MULLE_EXECUTABLE_VERSION_MAJOR}.${MULLE_EXECUTABLE_VERSION_MINOR}.${MULLE_EXECUTABLE_VERSION_PATCH}"
37 37
 
... ...
@@ -582,6 +582,20 @@ bootstrap_main()
582 582
          tag_main "$@" || exit 1
583 583
       ;;
584 584
 
585
+      type)
586
+         if is_minion_bootstrap_project
587
+         then
588
+            echo "Minion"
589
+         else
590
+            if is_master_bootstrap_project
591
+            then
592
+               echo "Master"
593
+            else
594
+               echo "Freeman"
595
+            fi
596
+         fi
597
+      ;;
598
+
585 599
       uname)
586 600
          echo "${UNAME}"
587 601
          exit 0
... ...
@@ -4,6 +4,12 @@
4 4
 		{
5 5
 			"path": ".",
6 6
          "file_exclude_patterns": [ "*~", "*~.*", "*.chk", ".DS_Store", "*.sublime-workspace" ],
7
+	 "folder_exclude_patterns": [
8
+		"package",
9
+		".bootstrap*",
10
+		".git*",
11
+	 ],
12
+
7 13
 		}
8 14
 	]
9 15
 }
... ...
@@ -119,7 +119,6 @@ find_make()
119 119
 }
120 120
 
121 121
 
122
-
123 122
 find_xcodebuild()
124 123
 {
125 124
    local name="$1"
... ...
@@ -2397,6 +2396,7 @@ build_main()
2397 2396
    [ -z "${DEFAULT_IFS}" ] && internal_fail "IFS fail"
2398 2397
    [ -z "${MULLE_BOOTSTRAP_SETTINGS_SH}" ]        && . mulle-bootstrap-settings.sh
2399 2398
    [ -z "${MULLE_BOOTSTRAP_COMMON_SETTINGS_SH}" ] && . mulle-bootstrap-common-settings.sh
2399
+   [ -z "${MULLE_BOOTSTRAP_REPOSITORIES_SH}" ]    && . mulle-bootstrap-repositories.sh
2400 2400
 
2401 2401
    local OPTION_CLEAN_BEFORE_BUILD
2402 2402
    local OPTION_CHECK_USR_LOCAL_INCLUDE
... ...
@@ -2515,7 +2515,6 @@ build_main()
2515 2515
 
2516 2516
    [ -z "${MULLE_BOOTSTRAP_COMMAND_SH}" ]      && . mulle-bootstrap-command.sh
2517 2517
    [ -z "${MULLE_BOOTSTRAP_GCC_SH}" ]          && . mulle-bootstrap-gcc.sh
2518
-   [ -z "${MULLE_BOOTSTRAP_REPOSITORIES_SH}" ] && . mulle-bootstrap-repositories.sh
2519 2518
    [ -z "${MULLE_BOOTSTRAP_SCRIPTS_SH}" ]      && . mulle-bootstrap-scripts.sh
2520 2519
 
2521 2520
    #
... ...
@@ -75,6 +75,7 @@ Options:
75 75
    --embedded-symlinks :  allow embedded symlinks (very experimental)
76 76
    --follow-symlinks   :  follow symlinks when updating (not recommended)
77 77
    --no-caches         :  don't use caches. Useful to counter flag -y
78
+   --no-git-mirror     :  don't mirror fetched git repositories
78 79
    --no-symlinks       :  don't create symlinks. Useful to counter flag -y
79 80
 
80 81
 EOF
... ...
@@ -231,13 +232,12 @@ can_symlink_it()
231 232
        # if bare repo, we can only clone anyway
232 233
       if git_is_bare_repository "${directory}"
233 234
       then
234
-         log_info "${directory} is a bare git repository. So cloning"
235
-         log_info "is the only way to go."
235
+         log_verbose "${directory} is a bare git repository. So no symlinking"
236 236
          return 1
237 237
       fi
238 238
    else
239
-      log_info "${directory} is not a git repository (yet ?)"
240
-      log_info "So symlinking is the only way to go."
239
+      log_info "${directory} is not a git repository (yet ?)
240
+So symlinking is the only way to go."
241 241
    fi
242 242
 
243 243
   return 0
... ...
@@ -337,7 +337,7 @@ search_for_git_repository_in_caches()
337 337
       found="`_search_for_git_repository_in_cache "${realdir}" "$@"`" || exit 1
338 338
       if [ ! -z "${found}" ]
339 339
       then
340
-         symlink_relpath "${found}" "${ROOT_DIR}"
340
+         echo "${found}"
341 341
          return
342 342
       fi
343 343
    done
... ...
@@ -568,11 +568,14 @@ clone_or_symlink()
568 568
 
569 569
             case "${operation}" in
570 570
                link_command)
571
-                 log_info "Using symlink to cached item \"${found}\""
571
+                 log_verbose "Using symlink to cached item \"${found}\""
572
+
573
+                 # compatible to earlier code
574
+                 found="`symlink_relpath "${found}" "${ROOT_DIR}"`"
572 575
                ;;
573 576
 
574 577
                *)
575
-                 log_info "Using cached item \"${found}\""
578
+                 log_verbose "Using cached item \"${found}\""
576 579
                ;;
577 580
             esac
578 581
          fi
... ...
@@ -1249,6 +1252,7 @@ work_clones()
1249 1252
 
1250 1253
                   log_info "Moving ${repotype}stash ${C_MAGENTA}${C_BOLD}${name}${C_INFO} from \"${oldstashdir}\" to \"${stashdir}\""
1251 1254
 
1255
+                  mkdir_stashparent_if_missing "${stashdir}"
1252 1256
                   if ! exekutor mv ${COPYMOVEFLAGS} "${oldstashdir}" "${stashdir}"  >&2
1253 1257
                   then
1254 1258
                      fail "Move failed!"
... ...
@@ -1663,6 +1667,7 @@ _common_main()
1663 1667
    local OPTION_ALLOW_CREATING_SYMLINKS="NO"
1664 1668
    local OPTION_ALLOW_CREATING_EMBEDDED_SYMLINKS="NO"
1665 1669
    local OPTION_ALLOW_SEARCH_CACHES="YES"
1670
+   local OPTION_ALLOW_GIT_MIRROR="YES"
1666 1671
    local OPTION_EMBEDDED_ONLY="NO"
1667 1672
    local OVERRIDE_BRANCH
1668 1673
    local DONT_WARN_SCRIPTS="NO"
... ...
@@ -1729,6 +1734,10 @@ _common_main()
1729 1734
             OPTION_ALLOW_CREATING_EMBEDDED_SYMLINKS="YES"
1730 1735
          ;;
1731 1736
 
1737
+         --no-git-mirror)
1738
+            OPTION_ALLOW_GIT_MIRROR="NO"
1739
+         ;;
1740
+
1732 1741
          --no-caches)
1733 1742
             OPTION_ALLOW_SEARCH_CACHES="NO"
1734 1743
          ;;
... ...
@@ -1785,6 +1794,20 @@ _common_main()
1785 1794
    [ -z "${MULLE_BOOTSTRAP_SCRIPTS_SH}" ]         && . mulle-bootstrap-scripts.sh
1786 1795
    [ -z "${MULLE_BOOTSTRAP_ZOMBIFY_SH}" ]         && . mulle-bootstrap-zombify.sh
1787 1796
 
1797
+   #
1798
+   # "repository" caches can and usually are outside the project folder
1799
+   # this can be multiple paths!
1800
+   if [ "OPTION_ALLOW_SEARCH_CACHES" = "YES" ]
1801
+   then
1802
+      CACHES_PATH="`read_config_setting "search_path" "${MULLE_BOOTSTRAP_CACHES_PATH}"`"
1803
+      CACHES_PATH="`add_path "${CACHES_PATH}" "${CLONE_CACHE}"`"
1804
+   fi
1805
+
1806
+   if [ "OPTION_ALLOW_GIT_MIRROR" = "YES" ]
1807
+   then
1808
+      git_enable_mirroring
1809
+   fi
1810
+
1788 1811
    #
1789 1812
    # should we check for '/usr/local/include/<name>' and don't fetch if
1790 1813
    # present (somewhat dangerous, because we do not check versions)
... ...
@@ -102,7 +102,6 @@ exekutor_trace_output()
102 102
 }
103 103
 
104 104
 
105
-
106 105
 exekutor()
107 106
 {
108 107
    exekutor_trace "$@"
... ...
@@ -206,7 +205,6 @@ logging_redirect_eval_exekutor()
206 205
 }
207 206
 
208 207
 
209
-
210 208
 # ####################################################################
211 209
 #                            Strings
212 210
 # ####################################################################
... ...
@@ -1340,7 +1338,7 @@ write_protect_directory()
1340 1338
       #
1341 1339
       # ensure basic structure is there to squelch linker warnings
1342 1340
       #
1343
-      log_fluff "Create default lib/include/Frameworks in $1"
1341
+      log_fluff "Create default lib/, include/, Frameworks/ in $1"
1344 1342
       exekutor mkdir "$1/Frameworks" 2> /dev/null
1345 1343
       exekutor mkdir "$1/lib" 2> /dev/null
1346 1344
       exekutor mkdir "$1/include" 2> /dev/null
... ...
@@ -41,7 +41,7 @@ bootstrap_dump_env()
41 41
 {
42 42
    log_trace "FULL trace started"
43 43
    log_trace "ARGS:${C_TRACE2} ${MULLE_ARGUMENTS}"
44
-   log_trace "PWD :${C_TRACE2} `pwd -P`"
44
+   log_trace "PWD :${C_TRACE2} `pwd -P 2> /dev/null`"
45 45
    log_trace "ENV :${C_TRACE2} `env | sort`"
46 46
    log_trace "LS  :${C_TRACE2} `ls -a1F`"
47 47
 }
... ...
@@ -326,7 +326,7 @@ bootstrap_should_defer_to_master()
326 326
    assert_sane_master_bootstrap_project "${masterpath}"
327 327
 
328 328
    case "${command}" in
329
-      git|setup-xcode|xcode|tag|version|defer|emancipate|uname|library-path)
329
+      git|defer|emancipate|library-path|setup-xcode|tag|type|uname|version|xcode)
330 330
          log_verbose "Minion executes locally"
331 331
       ;;
332 332
 
... ...
@@ -492,7 +492,6 @@ add_component()
492 492
 }
493 493
 
494 494
 
495
-
496 495
 unpostpone_trace()
497 496
 {
498 497
    if [ ! -z "${MULLE_TRACE_POSTPONE}" -a "${MULLE_TRACE}" = "1848" ]
... ...
@@ -694,6 +693,31 @@ assert_mulle_bootstrap_version()
694 693
 }
695 694
 
696 695
 
696
+_git_get_branch()
697
+{
698
+   local directory="${1:-${PWD}}"
699
+
700
+   (
701
+      cd "${directory}" &&
702
+      git rev-parse --abbrev-ref HEAD 2> /dev/null
703
+   ) || fail "Could not get branch for \"${directory}\""
704
+}
705
+
706
+
707
+_git_get_url()
708
+{
709
+   local directory="${1:-${PWD}}"
710
+   local remote="$2"
711
+
712
+   [ -d "${directory}" ] || internal_fail "wrong \"${directory}\""
713
+
714
+   (
715
+      cd "${directory}" ;
716
+      git config --get "remote.${remote}.url" 2> /dev/null
717
+   ) || fail "unknown \"${remote}\" in \"${directory}\" (`pwd`)"
718
+}
719
+
720
+
697 721
 #
698 722
 # expands ${setting} and ${setting:-foo}
699 723
 #
... ...
@@ -701,6 +725,7 @@ _expanded_variables()
701 725
 {
702 726
    local string="$1"
703 727
    local altbootstrap="$2"
728
+   local context="$3"
704 729
 
705 730
    local key
706 731
    local value
... ...
@@ -730,40 +755,59 @@ _expanded_variables()
730 755
       key="${tmp}"
731 756
    fi
732 757
 
733
-   if [ ! -z "${altbootstrap}" ]
734
-   then
735
-      local xdefault
758
+   case "${key}" in
759
+      GIT_BRANCH)
760
+         value="`_git_get_branch "${ROOT_DIR}"`"
761
+      ;;
736 762
 
737
-      xdefault="`(
738
-         BOOTSTRAP_DIR="${altbootstrap}"
739
-         MULLE_BOOTSTRAP_SETTINGS_NO_AUTO="YES"
763
+      GIT_REMOTE_*)
764
+         local remote
765
+         local url
740 766
 
741
-         read_root_setting "${key}"
742
-      )`"
767
+         remote="`sed 's/GIT_REMOTE_\(.*\)/\1/' <<< "${key}"`"
768
+         remote="`tr '[A-Z]' '[a-z]' <<< "${remote}"`"
769
+         url="`_git_get_url "${ROOT_DIR}" "${remote}"`"
770
+         value="`dirname "${url}"`"
771
+      ;;
743 772
 
744
-      default="${xdefault:-${default}}"
745
-   fi
773
+      *)
774
+         if [ ! -z "${altbootstrap}" ]
775
+         then
776
+            local xdefault
777
+
778
+            xdefault="`(
779
+               BOOTSTRAP_DIR="${altbootstrap}"
780
+               MULLE_BOOTSTRAP_SETTINGS_NO_AUTO="YES"
781
+
782
+               read_root_setting "${key}"
783
+            )`"
784
+
785
+            default="${xdefault:-${default}}"
786
+         fi
787
+
788
+         value="`read_root_setting "${key}"`"
789
+         if [ -z "${value}" ]
790
+         then
791
+            if [ -z "${default}" ]
792
+            then
793
+               log_warning "\${${key}} expanded to the empty string (${context}: \"${string}\")."
794
+               rval=1
795
+            else
796
+               log_setting "Root setting for ${C_MAGENTA}${key}${C_SETTING} set to default ${C_MAGENTA}${default}${C_SETTING}"
797
+               value="${default}"
798
+            fi
799
+         fi
800
+      ;;
801
+   esac
746 802
 
747
-   value="`read_root_setting "${key}"`"
748
-   if [ -z "${value}" ]
749
-   then
750
-      if [ -z "${default}" ]
751
-      then
752
-         log_warning "\${${key}} expanded to the empty string."
753
-         rval=1
754
-      else
755
-         log_setting "Root setting for ${C_MAGENTA}${key}${C_SETTING} set to default ${C_MAGENTA}${default}${C_SETTING}"
756
-         value="${default}"
757
-      fi
758
-   fi
759 803
 
760 804
    next="${prefix}${value}${suffix}"
761 805
    if [ "${next}" = "${string}" ]
762 806
    then
763
-      fail "${string} expands to itself"
807
+      fail "\"${string}\" expands to itself (${context})"
764 808
    fi
765 809
 
766
-   _expanded_variables "${next}" "${altbootstrap}"
810
+   _expanded_variables "${next}" "${altbootstrap}" "${context}"
767 811
    if [ $? -ne 0 ]
768 812
    then
769 813
       rval=1
... ...
@@ -50,19 +50,6 @@ git_is_bare_repository()
50 50
 }
51 51
 
52 52
 
53
-git_get_url()
54
-{
55
-   local remote
56
-
57
-   remote="$2"
58
-
59
-   (
60
-      cd "$1" &&
61
-      git remote get-url "${remote}"  >&2
62
-   ) || internal_fail "wrong \"$1\" or \"${remote}\" for \"`pwd`\""
63
-}
64
-
65
-
66 53
 git_set_url()
67 54
 {
68 55
    local remote
... ...
@@ -188,27 +175,27 @@ _git_clone_cacheurl()
188 175
 {
189 176
    local url="$1"; shift
190 177
 
191
-   local cachedir
178
+   local mirrordir
192 179
 
193
-   mkdir_if_missing "${CLONE_CACHE}"
194
-   cachedir="${CLONE_CACHE}/`basename ${url}`" # try to keep it global
180
+   mkdir_if_missing "${GIT_MIRROR}"
181
+   mirrordir="${GIT_MIRROR}/`basename ${url}`" # try to keep it global
195 182
 
196
-   if [ ! -d "${cachedir}" ]
183
+   if [ ! -d "${mirrordir}" ]
197 184
    then
198
-      if ! exekutor git ${GITFLAGS} clone --mirror ${options} ${GITOPTIONS} -- "${url}" "${cachedir}" >&2
185
+      if ! exekutor git ${GITFLAGS} clone --mirror ${options} ${GITOPTIONS} -- "${url}" "${mirrordir}" >&2
199 186
       then
200
-         log_error "git clone of \"${url}\" into \"${cachedir}\" failed"
187
+         log_error "git clone of \"${url}\" into \"${mirrordir}\" failed"
201 188
          return 1
202 189
       fi
203 190
    else
204 191
       # refetch
205
-      local refresh_cache
192
+      local refresh_git_mirror
206 193
 
207
-      refresh_cache="`read_config_setting "refresh_cache" "YES"`"
208
-      if [ "${refresh_cache}" = "YES" ]
194
+      refresh_git_mirror="`read_config_setting "refresh_git_mirror" "YES"`"
195
+      if [ "${refresh_git_mirror}" = "YES" ]
209 196
       then
210 197
       (
211
-         cd "${cachedir}";
198
+         cd "${mirrordir}";
212 199
          if ! exekutor git ${GITFLAGS} fetch >&2
213 200
          then
214 201
             log_warning "git fetch from \"${url}\" failed, using old state"
... ...
@@ -217,7 +204,7 @@ _git_clone_cacheurl()
217 204
       fi
218 205
    fi
219 206
 
220
-   echo "${cachedir}"
207
+   echo "${mirrordir}"
221 208
 }
222 209
 
223 210
 
... ...
@@ -253,7 +240,7 @@ _git_clone()
253 240
       ;;
254 241
 
255 242
       *:*)
256
-         if [ ! -z "${CLONE_CACHE}" ]
243
+         if [ ! -z "${GIT_MIRROR}" ]
257 244
          then
258 245
             url="`_git_clone_cacheurl ${url}`"
259 246
          fi
... ...
@@ -326,7 +313,7 @@ git_fetch()
326 313
       ;;
327 314
 
328 315
       *:*)
329
-         if [ ! -z "${CLONE_CACHE}" ]
316
+         if [ ! -z "${GIT_MIRROR}" ]
330 317
          then
331 318
             url="`_git_clone_cacheurl ${url}`"
332 319
          fi
... ...
@@ -360,7 +347,7 @@ git_pull()
360 347
       ;;
361 348
 
362 349
       *:*)
363
-         if [ ! -z "${CLONE_CACHE}" ]
350
+         if [ ! -z "${GIT_MIRROR}" ]
364 351
          then
365 352
             url="`_git_clone_cacheurl ${url}`"
366 353
          fi
... ...
@@ -901,24 +888,25 @@ zip_unpack()
901 888
 }
902 889
 
903 890
 
891
+git_enable_mirroring()
892
+{
893
+   # stuff clones get intermediate saved too, default empty
894
+   GIT_MIRROR="`read_config_setting "git_mirror"`"
895
+   if [ -z "${GIT_MIRROR}" ]
896
+   then
897
+      GIT_MIRROR="`read_config_setting "clone_cache"`"  # old value
898
+   fi
899
+}
900
+
904 901
 
905 902
 scm_initialize()
906 903
 {
907 904
    log_debug ":scm_initialize:"
908 905
 
909
-   [ -z "${MULLE_BOOTSTRAP_FUNCTIONS_SH}" ] && . mulle-bootstrap-functions.sh
906
+   [ -z "${MULLE_BOOTSTRAP_FUNCTIONS_SH}" ]    && . mulle-bootstrap-functions.sh
910 907
    [ -z "${MULLE_BOOTSTRAP_REPOSITORIES_SH}" ] && . mulle-bootstrap-repositories.sh
911
-
912
-   #
913
-   # "repository" caches can and usually are outside the project folder
914
-   # this can be multiple paths!
915
-   CACHES_PATH="`read_config_setting "search_path" "${MULLE_BOOTSTRAP_CACHES_PATH}"`"
916
-
917
-   # stuff clones get intermediate saved too, default empty
918
-   CLONE_CACHE="`read_config_setting "clone_cache"`"
919
-   CACHES_PATH="`add_path "${CACHES_PATH}" "${CLONE_CACHE}"`"
920
-
921
-   :
922 908
 }
923 909
 
924 910
 scm_initialize
911
+
912
+:
925 913
\ No newline at end of file
... ...
@@ -113,7 +113,6 @@ build_dir
113 113
 build_log_dir
114 114
 build_preferences
115 115
 search_path
116
-clone_cache
117 116
 check_usr_local_include
118 117
 clean_before_build
119 118
 clean_dependencies_before_build
... ...
@@ -128,6 +127,7 @@ dont_warn_scripts
128 127
 editor
129 128
 embedded_symlinks
130 129
 framework_dir_name
130
+git_mirror
131 131
 header_dir_name
132 132
 install_clean_folders
133 133
 install_symlinks
... ...
@@ -138,6 +138,7 @@ open_brews_file
138 138
 open_repositories_file
139 139
 output_clean_folders
140 140
 override_branch
141
+refresh_git_mirror
141 142
 rpath_frameworks
142 143
 rpath_libraries
143 144
 stashes_dir
... ...
@@ -768,7 +769,7 @@ read_expanded_setting()
768 769
    do
769 770
       IFS="${DEFAULT_IFS}"
770 771
 
771
-      expanded_variables "${line}" "${srcbootstrap}"
772
+      expanded_variables "${line}" "${srcbootstrap}" "${filepath}"
772 773
       if [ $? -ne 0 ]
773 774
       then
774 775
          empty_expansion_is_error="`read_config_setting "empty_expansion_is_error" "YES"`"
... ...
@@ -1,15 +1,16 @@
1 1
 #! /bin/sh -e
2 2
 
3
-. mulle-bootstrap-functions.sh
4
-. mulle-bootstrap-local-environment.sh
3
+. ./mulle-bootstrap-functions.sh
4
+. ./mulle-bootstrap-local-environment.sh
5
+. ./mulle-bootstrap-settings.sh
5 6
 
6 7
 
7 8
 run_test()
8 9
 {
9
-  expect="$1"
10
+  expect="$1" 
10 11
   shift
11 12
 
12
-  result="`eval "$@"`"
13
+  result="`expanded_variables "$2" "" ""`"
13 14
 
14 15
   [ "${result}" != "${expect}" ] && fail "test:" "$@" "failed with \"${result}\", expected \"${expect}\""
15 16
   :
... ...
@@ -20,19 +21,27 @@ test_expand()
20 21
 {
21 22
   FOO="foo"
22 23
 
23
-  run_test "foo" expanded_variables '${FOO}'
24
-  run_test "foo" expanded_variables '${FOO:-bar}'
24
+  run_test "foo" '${FOO}'
25
+  run_test "foo" '${FOO:-bar}'
25 26
 
26
-  run_test "foofoo" expanded_variables '${FOO}${FOO}'
27
+  run_test "foofoo" '${FOO}${FOO}'
27 28
 
28
-  run_test "" expanded_variables '${BAR}'
29
-  run_test "foo" expanded_variables '${BAR:-foo}'
29
+  run_test "" '${BAR}'
30
+  run_test "foo" '${BAR:-foo}'
30 31
 
31 32
   # obscure but OK
32
-  run_test "-bar" expanded_variables '${FOO+-bar}'
33
+  run_test "-bar" '${FOO+-bar}'
33 34
 }
34 35
 
35 36
 
37
+test_git_remote_expand()
38
+{
39
+   set -x
40
+   run_test "nat@mulle-kybernetik.com:/scm/public_git/repositories/mulle-tests" expanded_variables '${GIT_REMOTE_PUBLIC}/mulle-tests'
41
+   exit 0
42
+}
43
+
44
+test_git_remote_expand
36 45
 test_expand
37 46
 
38 47
 echo "test finished" >&2