commit b1628c5a7bdb6ca93623d19091f24111a6b2307e
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2026-06-28T00:33:56Z |
| subject | compile sources.list |
commit b1628c5a7bdb6ca93623d19091f24111a6b2307e
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2026-06-28T00:33:56Z
compile sources.list
---
bash/{ => dist}/rbashrc | 2 ++
bash/dist/sources.list | 17 +++++++++++++++++
bash/tools/build-rbashrc.sh | 35 +++++++++++++++++++++--------------
3 files changed, 40 insertions(+), 14 deletions(-)
diff --git a/bash/rbashrc b/bash/dist/rbashrc
similarity index 99%
rename from bash/rbashrc
rename to bash/dist/rbashrc
index 11e486a..d42ff65 100755
--- a/bash/rbashrc
+++ b/bash/dist/rbashrc
@@ -18,6 +18,8 @@ RBASH_CONFIG="$RBASH_HOME/config"
RBASH_ENV="$RBASH_HOME/env"
RBASH_MERGED="$RBASH_CACHE_DIR/merged"
RBASH_BIN="$RBASH_HOME/bin"
+RBASH_SOURCES_SUM="73d5a21b8fb839abe8e52bbc14b62183d59345d2184324a9cd6fa5d3300aa369"
+
# ---- rbash: bash/core/00_env.bash ----
diff --git a/bash/dist/sources.list b/bash/dist/sources.list
new file mode 100644
index 0000000..1f4bbc8
--- /dev/null
+++ b/bash/dist/sources.list
@@ -0,0 +1,17 @@
+02f2e97343c190295dd83d6a58fa6f5c17ee54a7df0fc71dc328bc2d267fccdf sources/09_ssh-agent
+c4b84e73ff9c54631cb24131082e0c15eb53b6fbff47429a0a24aea65c002c52 sources/10_aliases
+e50644286373408263ce5a6f455bf967585a767cce055e67423bd33fdafeab9f sources/12_shortcuts
+043a103f7602304732b37c8219ba4f74bc8af37278fc6d2f63d642ef9a29a6fe sources/13_shortcuts_macos
+3340cf44a97771e6839e03443e8276c25804e0918c0415b1ffe0112d060cee2d sources/14_shortcuts_greps
+08582e2e49d71f0771a0ba38cddb58ea57e22304a89e1feb55175cde9adffe60 sources/15_gpg-agent
+38ad7eb828205ba40acf925d96fbac381ade4f623f0694237b3860c77aacd654 sources/16_keystore
+570a67928ad4eb2ae343ebc3eee39413989087388fe35e0cd675573add6730b0 sources/17_kcontext
+f45e3d068475a40b838336f675948d07b544967d03fbf491abd70e131db38fb0 sources/18_kotp
+9d26839015cf799a0cb2661c49be3f1197fbbc5faf954302eeac93696c85a221 sources/19_k8s_funcs
+60c468b70dbcfa2d198362b90278e4a5e86fb1784c85e846402527df7406774d sources/21_win-greps
+e007fe16e8ed65c5dca0effcd7227ed52008ca42fe3b6f1b7344a685c17ac02f sources/22_win-setups
+b5a488efc0558e2b795a1558e2c91a8aeecc3fd441d437aff3a4749d5eb0bdfc sources/23_win-binaries
+5dbc166ce1b051b54d244ef5dc6b52dfbff03965e9abb0ed891d441dffbf8a76 sources/31_git-utils
+c9c270376844e7c7e3c48b1e86c2ce3e7824dde64e8724c17c5fc95910abd11c sources/40_go-command
+c0e8ef70466063907b5ed9e52c13532b0019b8cb5975d020899804549a76a37f sources/41_pivot-command
+d02be2a68e8bd1f7e5adacbdd0bdc4f426aabfa1a57709270b673617db6c5352 sources/60_diagnostics
diff --git a/bash/tools/build-rbashrc.sh b/bash/tools/build-rbashrc.sh
index aea24ec..88aaeb2 100755
--- a/bash/tools/build-rbashrc.sh
+++ b/bash/tools/build-rbashrc.sh
@@ -2,26 +2,33 @@
set -euo pipefail
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
-out="$root/bash/rbashrc"
+dist="$root/bash/dist"
+out="$dist/rbashrc"
+
+sha256sum "$root"/bash/sources/* \
+ | sed "s| $root/bash/| |" > "$dist"/sources.list
{
- cat "$root/bash/rbashrc.in"
+ cat "$root/bash/rbashrc.in"
+
+ echo ""
+ echo "RBASH_SOURCES_SUM=\""$(sha256sum "$dist"/sources.list | cut -d' ' -f1)"\""
- shopt -s nullglob
+ shopt -s nullglob
- core_files=( "$root"/bash/core/*.bash )
+ core_files=( "$root"/bash/core/*.bash )
- if [ "${#core_files[@]}" -eq 0 ]; then
- echo "error: no core files found under bash/core/*.bash" >&2
- exit 1
- fi
+ if [ "${#core_files[@]}" -eq 0 ]; then
+ echo "error: no core files found under bash/core/*.bash" >&2
+ exit 1
+ fi
- for f in "${core_files[@]}"; do
- rel="${f#$root/}"
- printf '\n\n# ---- rbash: %s ----\n\n' "$rel"
- cat "$f"
- done
+ for f in "${core_files[@]}"; do
+ rel="${f#$root/}"
+ printf '\n\n# ---- rbash: %s ----\n\n' "$rel"
+ cat "$f"
+ done
} > "$out"
chmod +x "$out"
-echo "wrote $out"
\ No newline at end of file
+echo "wrote $out"