Skip to content

Commit 89a4c40

Browse files
committed
Upstream.
1 parent d6d3600 commit 89a4c40

File tree

6 files changed

+1903
-56
lines changed

6 files changed

+1903
-56
lines changed

_prog/core-micro.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,37 @@ _get_ingredientVM() {
6868
_messagePlain_bad 'bad: FAIL: hash'
6969
_messageFAIL
7070
}
71+
_get_fromTag_ingredientVM() {
72+
_messageNormal '##### init: _get_fromTag_ingredientVM'
73+
rm -f "$scriptLocal"/vm-ingredient.img > /dev/null 2>&1
74+
rm -f "$scriptLocal"/vm-ingredient.img.hash-download.txt > /dev/null 2>&1
75+
rm -f "$scriptLocal"/vm-ingredient.img.hash-upstream.txt > /dev/null 2>&1
76+
77+
local currentTag="$1"
78+
#[[ "$currentTag" == "" ]] && currentTag=latest
79+
#[[ "$currentTag" == "" ]] && currentTag=internal
80+
#-whirlpool
81+
if ! _wget_githubRelease-fromTag_join-stdout "soaringDistributions/ubDistBuild" "$currentTag" "vm-ingredient.img.flx" | xz -d | tee >(openssl dgst -sha3-512 -binary | xxd -p -c 256 > "$scriptLocal"/vm-ingredient.img.hash-download.txt) > "$scriptLocal"/vm-ingredient.img
82+
then
83+
_messagePlain_bad 'bad: FAIL: get'
84+
_messageFAIL
85+
fi
86+
87+
# Hash
88+
echo
89+
cat "$scriptLocal"/vm-ingredient.img.hash-download.txt
90+
91+
_wget_githubRelease-stdout "soaringDistributions/ubDistBuild" "$currentTag" "vm-ingredient.img.hash.txt" > "$scriptLocal"/vm-ingredient.img.hash-upstream.txt
92+
#$(_wget_githubRelease-stdout "soaringDistributions/ubDistBuild" "$currentTag" "vm-ingredient.img.hash.txt" | tr -dc 'a-f0-9')
93+
if [[ $(cat "$scriptLocal"/vm-ingredient.img.hash-upstream.txt | tr -dc 'a-f0-9') == $(cat "$scriptLocal"/vm-ingredient.img.hash-download.txt | tr -dc 'a-f0-9') ]]
94+
then
95+
_messagePlain_good 'good: hash'
96+
return 0
97+
fi
98+
99+
_messagePlain_bad 'bad: FAIL: hash'
100+
_messageFAIL
101+
}
71102
_join_ingredientVM() {
72103
_messageNormal '##### init: _join_ingredientVM'
73104

_prog/hash.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ _hash_img-stream() {
100100
local currentFileName=vm.img
101101
local currentFilePath=/dev/stdin
102102

103-
_wget_githubRelease_join-stdout "soaringDistributions/ubDistBuild" "$1" "package_image.tar.flx" 2> /dev/null | _get_extract_ubDistBuild-tar --extract ./vm.img --to-stdout | \
103+
_wget_githubRelease-fromTag_join-stdout "soaringDistributions/ubDistBuild" "$1" "package_image.tar.flx" 2> /dev/null | _get_extract_ubDistBuild-tar --extract ./vm.img --to-stdout | \
104104
tee >( wc -c /dev/stdin | cut -f1 -d\ | tr -dc '0-9' > "$safeTmp"/.tmp-currentFileBytes ) | \
105105
tee >( openssl dgst -whirlpool -binary | xxd -p -c 256 > "$safeTmp"/.tmp-whirlpool ) | \
106106
( [[ "$skimfast" != "true" ]] && openssl dgst -sha3-512 -binary | xxd -p -c 256 > "$safeTmp"/.tmp-sha3 )
@@ -149,7 +149,7 @@ _hash_rootfs-stream() {
149149
local currentFileName=package_rootfs.tar
150150
local currentFilePath=/dev/stdin
151151

152-
_wget_githubRelease_join-stdout "soaringDistributions/ubDistBuild" "$1" "package_rootfs.tar.flx" 2> /dev/null | lz4 -d -c | \
152+
_wget_githubRelease-fromTag_join-stdout "soaringDistributions/ubDistBuild" "$1" "package_rootfs.tar.flx" 2> /dev/null | lz4 -d -c | \
153153
tee >( wc -c /dev/stdin | cut -f1 -d\ | tr -dc '0-9' > "$safeTmp"/.tmp-currentFileBytes ) | \
154154
tee >( openssl dgst -whirlpool -binary | xxd -p -c 256 > "$safeTmp"/.tmp-whirlpool ) | \
155155
( [[ "$skimfast" != "true" ]] && openssl dgst -sha3-512 -binary | xxd -p -c 256 > "$safeTmp"/.tmp-sha3 )
@@ -198,7 +198,7 @@ _hash_live-stream() {
198198
local currentFileName=vm-live.iso
199199
local currentFilePath=/dev/stdin
200200

201-
_wget_githubRelease_join-stdout "soaringDistributions/ubDistBuild" "$1" "vm-live.iso" 2> /dev/null | \
201+
_wget_githubRelease-fromTag_join-stdout "soaringDistributions/ubDistBuild" "$1" "vm-live.iso" 2> /dev/null | \
202202
tee >( wc -c /dev/stdin | cut -f1 -d\ | tr -dc '0-9' > "$safeTmp"/.tmp-currentFileBytes ) | \
203203
tee >( openssl dgst -whirlpool -binary | xxd -p -c 256 > "$safeTmp"/.tmp-whirlpool ) | \
204204
( [[ "$skimfast" != "true" ]] && openssl dgst -sha3-512 -binary | xxd -p -c 256 > "$safeTmp"/.tmp-sha3 )

compile.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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'
3838
export ub_setScriptChecksum_header='2591634041'
39-
export ub_setScriptChecksum_contents='2868637459'
39+
export ub_setScriptChecksum_contents='2623368490'
4040

4141
# CAUTION: Symlinks may cause problems. Disable this test for such cases if necessary.
4242
# WARNING: Performance may be crucial here.
@@ -7837,6 +7837,10 @@ _compile_bash_shortcuts() {
78377837

78387838
includeScriptList+=( "shortcuts/git"/gitBest.sh )
78397839
includeScriptList+=( "shortcuts/git"/wget_githubRelease_internal.sh )
7840+
( [[ "$enUb_github" == "true" ]] || [[ "$enUb_notLean" == "true" ]] || [[ "$enUb_cloud" == "true" ]] || [[ "$enUb_cloud_heavy" == "true" ]] || [[ "$enUb_cloud_self" == "true" ]] ) && includeScriptList+=( "shortcuts/git"/wget_githubRelease_tag.sh )
7841+
7842+
( [[ "$enUb_notLean" == "true" ]] || [[ "$enUb_dev_heavy" == "true" ]] || [[ "$enUb_repo" == "true" ]] || [[ "$enUb_github" == "true" ]] || [[ "$enUb_cloud" == "true" ]] || [[ "$enUb_cloud_heavy" == "true" ]] || [[ "$enUb_cloud_self" == "true" ]] ) && includeScriptList+=( "shortcuts"/remoteShortcuts.sh )
7843+
78407844

78417845
( [[ "$enUb_github" == "true" ]] || [[ "$enUb_notLean" == "true" ]] || [[ "$enUb_cloud" == "true" ]] || [[ "$enUb_cloud_heavy" == "true" ]] || [[ "$enUb_cloud_self" == "true" ]] ) && includeScriptList+=( "shortcuts/git"/gitCompendium.sh )
78427846

0 commit comments

Comments
 (0)