@@ -36,7 +36,7 @@ _ub_cksum_special_derivativeScripts_contents() {
3636# export ub_setScriptChecksum_disable='true'
3737( [[ -e " $0 " .nck ]] || [[ " ${BASH_SOURCE[0]} " != " ${0} " ]] || [[ " $1 " == ' --profile' ]] || [[ " $1 " == ' --script' ]] || [[ " $1 " == ' --call' ]] || [[ " $1 " == ' --return' ]] || [[ " $1 " == ' --devenv' ]] || [[ " $1 " == ' --shell' ]] || [[ " $1 " == ' --bypass' ]] || [[ " $1 " == ' --parent' ]] || [[ " $1 " == ' --embed' ]] || [[ " $1 " == ' --compressed' ]] || [[ " $0 " == " /bin/bash" ]] || [[ " $0 " == " -bash" ]] || [[ " $0 " == " /usr/bin/bash" ]] || [[ " $0 " == " bash" ]] ) && export ub_setScriptChecksum_disable=' true'
3838export ub_setScriptChecksum_header=' 2591634041'
39- export ub_setScriptChecksum_contents=' 3480762536 '
39+ export ub_setScriptChecksum_contents=' 765495136 '
4040
4141# CAUTION: Symlinks may cause problems. Disable this test for such cases if necessary.
4242# WARNING: Performance may be crucial here.
@@ -1447,6 +1447,11 @@ _report_setup_ubcp() {
14471447 [[ "$currentCygdriveC_equivalent" == "" ]] && currentCygdriveC_equivalent=$(cygpath -S | sed ' s/\/ Windows\/ System32//g' )
14481448 [[ "$1" == "/" ]] && currentCygdriveC_equivalent=$(echo "$PWD" | sed ' s/\(\/ cygdrive\/ [a-zA-Z]* \) .* /\1 /' )
14491449
1450+
1451+ mkdir -p "$currentCygdriveC_equivalent"/core/infrastructure/
1452+ #cd "$currentCygdriveC_equivalent"/core/infrastructure/
1453+
1454+
14501455 find /bin/ /usr/bin/ /sbin/ /usr/sbin/ | tee "$currentCygdriveC_equivalent"/core/infrastructure/ubcp-binReport > /dev/null
14511456
14521457
@@ -1929,6 +1934,75 @@ _package-cygwin() {
19291934
19301935
19311936
1937+
1938+ # Discouraged. Few file paths, some setup, etc, may be different. Otherwise, WSL should not be treated differently.
1939+ _if_wsl() {
1940+ uname -a | grep -i ' microsoft' > /dev/null 2>&1 || uname -a | grep -i ' WSL2' > /dev/null 2>&1
1941+ }
1942+
1943+
1944+
1945+ # Ingredients. Debian pacakges mirror, docker images, pre-built dist/OS images, etc.
1946+ _set_ingredients() {
1947+ export ub_INGREDIENTS=""
1948+
1949+ local currentDriveLetter
1950+
1951+ if ! _if_cygwin
1952+ then
1953+ [[ -e /mnt/ingredients/ingredients ]] && mountpoint /mnt/ingredients && export ub_INGREDIENTS=/mnt/ingredients/ingredients && return 0
1954+
1955+ # STRONGLY PREFERRED.
1956+ [[ -e /mnt/ingredients ]] && mountpoint /mnt/ingredients && export ub_INGREDIENTS=/mnt/ingredients && return 0
1957+
1958+ # STRONGLY DISCOURAGED.
1959+ # Do NOT create "$HOME"/core/ingredients unless for some very unexpected reason it is necessary for a non-root user to use ingredients.
1960+ [[ -e "$HOME"/core/ingredients ]] && export ub_INGREDIENTS="$HOME"/core/ingredients && return 0
1961+
1962+ # WSL(2) specific.
1963+ #_if_wsl
1964+ #uname -a | grep -i ' microsoft' > /dev/null 2>&1 || uname -a | grep -i ' WSL2' > /dev/null 2>&1
1965+ if type _if_wsl > /dev/null 2>&1 && _if_wsl
1966+ then
1967+ [[ -e /mnt/host/z/mnt/ingredients ]] && export ub_INGREDIENTS=/mnt/host/z/mnt/ingredients && return 0
1968+ [[ -e /mnt/z/mnt/ingredients ]] && export ub_INGREDIENTS=/mnt/z/mnt/ingredients && return 0
1969+ [[ -e /mnt/c/core/ingredients ]] && export ub_INGREDIENTS=/mnt/c/core/ingredients && return 0
1970+ [[ -e /mnt/host/c/core/ingredients ]] && export ub_INGREDIENTS=/mnt/host/c/core/ingredients && return 0
1971+ #
1972+ for currentDriveLetter in d e f g h i j k l m n o p q r s t u v w D E F G H I J K L M N O P Q R S T U V W
1973+ do
1974+ [[ -e /mnt/"$currentDriveLetter"/ingredients ]] && export ub_INGREDIENTS=/mnt/"$currentDriveLetter"/ingredients && return 0
1975+ done
1976+ if [[ -e /mnt/host ]]
1977+ then
1978+ for currentDriveLetter in d e f g h i j k l m n o p q r s t u v w D E F G H I J K L M N O P Q R S T U V W
1979+ do
1980+ [[ -e /mnt/host/"$currentDriveLetter"/ingredients ]] && export ub_INGREDIENTS=/mnt/host/"$currentDriveLetter"/ingredients && return 0
1981+ done
1982+ fi
1983+ fi
1984+ fi
1985+
1986+ if _if_cygwin
1987+ then
1988+ [[ -e /cygdrive/z/mnt/ingredients ]] && export ub_INGREDIENTS=/cygdrive/z/mnt/ingredients && return 0
1989+ [[ -e /cygdrive/c/core/ingredients ]] && export ub_INGREDIENTS=/cygdrive/c/core/ingredients && return 0
1990+ #
1991+ for currentDriveLetter in d e f g h i j k l m n o p q r s t u v w D E F G H I J K L M N O P Q R S T U V W
1992+ do
1993+ [[ -e /cygdrive/"$currentDriveLetter"/ingredients ]] && export ub_INGREDIENTS=/cygdrive/"$currentDriveLetter"/ingredients && return 0
1994+ done
1995+ fi
1996+
1997+
1998+
1999+
2000+ [[ "$ub_INGREDIENTS" == "" ]] && return 1
2001+ return 0
2002+ }
2003+
2004+
2005+
19322006#####Utilities
19332007
19342008_test_getAbsoluteLocation_sequence() {
@@ -3644,6 +3718,17 @@ _messagePlain_probe_noindent() {
36443718 echo
36453719 return 0
36463720}
3721+ # WARNING: Less track record with very unusual text. May or may not output correctly in some (unknown, unexpected) situations.
3722+ # DANGER: MUST use this function instead of _messagePlain_probe when text is from external origins!
3723+ _messagePlain_probe_safe () {
3724+ _color_begin_probe
3725+ # _color_begin_probe_noindent
3726+ # echo -n "$@"
3727+ _safeEcho " $@ "
3728+ _color_end
3729+ echo
3730+ return
3731+ }
36473732
36483733# Blue. Diagnostic instrumentation.
36493734# "generic/ubiquitousheader.sh"
@@ -5996,6 +6081,12 @@ _deps_dev_heavy_atom() {
59966081 export enUb_dev_heavy_atom=" true"
59976082}
59986083
6084+ _deps_dev_buildOps () {
6085+ _deps_generic
6086+
6087+ export enUb_dev_buildOps=" true"
6088+ }
6089+
59996090_deps_cloud_heavy () {
60006091 _deps_notLean
60016092 export enUb_cloud_heavy=" true"
@@ -6847,6 +6938,8 @@ _compile_bash_deps() {
68476938
68486939 if [[ " $1 " == " lean" ]]
68496940 then
6941+ _deps_dev_buildOps
6942+
68506943 # _deps_git
68516944
68526945 # _deps_virt_translation
@@ -6865,7 +6958,10 @@ _compile_bash_deps() {
68656958 # Specifically intended to be imported into user profile.
68666959 if [[ " $1 " == " ubcore" ]]
68676960 then
6961+ _deps_dev_buildOps
6962+
68686963 _deps_notLean
6964+ _deps_os_x11
68696965
68706966 _deps_serial
68716967
@@ -6924,6 +7020,8 @@ _compile_bash_deps() {
69247020
69257021 if [[ " $1 " == " cautossh" ]]
69267022 then
7023+ _deps_dev_buildOps
7024+
69277025 _deps_os_x11
69287026 _deps_proxy
69297027 _deps_proxy_special
@@ -6965,6 +7063,7 @@ _compile_bash_deps() {
69657063 if [[ " $1 " == " processor" ]]
69667064 then
69677065 _deps_dev
7066+ _deps_dev_buildOps
69687067
69697068 _deps_generic
69707069
@@ -6991,6 +7090,7 @@ _compile_bash_deps() {
69917090 if [[ " $1 " == " abstract" ]] || [[ " $1 " == " abstractfs" ]]
69927091 then
69937092 _deps_dev
7093+ _deps_dev_buildOps
69947094
69957095 _deps_python
69967096 _deps_haskell
@@ -7017,6 +7117,7 @@ _compile_bash_deps() {
70177117 if [[ " $1 " == " fakehome" ]]
70187118 then
70197119 _deps_dev
7120+ _deps_dev_buildOps
70207121
70217122 _deps_python
70227123 _deps_haskell
@@ -7045,6 +7146,7 @@ _compile_bash_deps() {
70457146 _deps_dev_heavy
70467147 # _deps_dev_heavy_atom
70477148 _deps_dev
7149+ _deps_dev_buildOps
70487150
70497151 # _deps_cloud_heavy
70507152
@@ -7150,6 +7252,7 @@ _compile_bash_deps() {
71507252 _deps_dev_heavy
71517253 # _deps_dev_heavy_atom
71527254 _deps_dev
7255+ _deps_dev_buildOps
71537256
71547257 # _deps_cloud_heavy
71557258
@@ -7187,7 +7290,7 @@ _compile_bash_deps() {
71877290 _deps_python
71887291 _deps_haskell
71897292
7190- _deps_ai
7293+ # _deps_ai
71917294 _deps_ai_shortuts
71927295
71937296 _deps_calculators
@@ -7249,12 +7352,19 @@ _compile_bash_deps() {
72497352
72507353 return 0
72517354 fi
7355+
7356+ if [[ " $1 " == " core_ai" ]]
7357+ then
7358+ _deps_ai
7359+ _compile_bash_deps ' core'
7360+ fi
72527361
72537362 if [[ " $1 " == " " ]] || [[ " $1 " == " ubiquitous_bash" ]] || [[ " $1 " == " ubiquitous_bash.sh" ]] || [[ " $1 " == " complete" ]]
72547363 then
72557364 _deps_dev_heavy
72567365 # _deps_dev_heavy_atom
72577366 _deps_dev
7367+ _deps_dev_buildOps
72587368
72597369 _deps_cloud_heavy
72607370
@@ -7377,6 +7487,9 @@ _compile_bash_header() {
73777487 includeScriptList+=( " os/override" /override_prog.sh )
73787488
73797489 includeScriptList+=( " os/override" /override_cygwin.sh )
7490+ includeScriptList+=( " os/override" /override_wsl.sh )
7491+
7492+ includeScriptList+=( " special" /ingredients.sh )
73807493}
73817494
73827495_compile_bash_header_program () {
@@ -7667,6 +7780,7 @@ _compile_bash_shortcuts() {
76677780 [[ " $enUb_dev " == " true" ]] && includeScriptList+=( " shortcuts/dev/scope" /devscope_app.sh )
76687781
76697782 ( [[ " $enUb_github " == " true" ]] || [[ " $enUb_notLean " == " true" ]] || [[ " $enUb_cloud " == " true" ]] || [[ " $enUb_cloud_heavy " == " true" ]] || [[ " $enUb_cloud_self " == " true" ]] ) && includeScriptList+=( " shortcuts/github" /github_removeHTTPS.sh )
7783+ ( [[ " $enUb_github " == " true" ]] || [[ " $enUb_notLean " == " true" ]] || [[ " $enUb_cloud " == " true" ]] || [[ " $enUb_cloud_heavy " == " true" ]] || [[ " $enUb_cloud_self " == " true" ]] ) && includeScriptList+=( " shortcuts/github" /github_upload_parts.sh )
76707784
76717785 ( [[ " $enUb_repo " == " true" ]] && [[ " $enUb_git " == " true" ]] ) && includeScriptList+=( " shortcuts/git" /git.sh )
76727786 ( [[ " $enUb_repo " == " true" ]] && [[ " $enUb_git " == " true" ]] ) && includeScriptList+=( " shortcuts/git" /gitBare.sh )
@@ -7960,6 +8074,7 @@ _compile_bash_selfHost() {
79608074_compile_bash_overrides () {
79618075 export includeScriptList
79628076
8077+ [[ " $enUb_dev_buildOps " == " true" ]] && includeScriptList+=( " build/zSpecial" /build-ops.sh )
79638078
79648079 includeScriptList+=( " structure" /overrides.sh )
79658080}
@@ -8124,11 +8239,14 @@ _compile_bash() {
81248239 includeScriptList+=( " generic" /rottenheader.sh )
81258240 # includeScriptList+=( "generic"/minimalheader.sh )
81268241 # includeScriptList+=( "generic"/ubiquitousheader.sh )
8242+
8243+ includeScriptList+=( " special" /ingredients.sh )
81278244
81288245 # includeScriptList+=( "os/override"/override.sh )
81298246 # includeScriptList+=( "os/override"/override_prog.sh )
81308247
81318248 # includeScriptList+=( "os/override"/override_cygwin.sh )
8249+ # includeScriptList+=( "os/override"/override_wsl.sh )
81328250
81338251
81348252
0 commit comments