summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHibby <hibby@Hibbys-MacBook-Air.local>2026-04-26 06:53:11 -0500
committerHibby <hibby@Hibbys-MacBook-Air.local>2026-04-26 06:53:11 -0500
commit5d7e8cd759bc2e784a146d1f7b9f70489614f43a (patch)
treed02b88e7041cc5e2ba604a82e514848a2e311212
parent3a56900c90a2824f0a42462c30095313c123bd5a (diff)
Run remote verification commands under bash
-rw-r--r--build-helpers.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/build-helpers.sh b/build-helpers.sh
index 26de872..20a6a2b 100644
--- a/build-helpers.sh
+++ b/build-helpers.sh
@@ -553,8 +553,17 @@ verify_remote() {
local remote_host="${REMOTE_TARGET%%:*}"
local remote_path="${REMOTE_TARGET#*:}"
local remote_path_q
+ local remote_file_script
+ local remote_link_script
+ local remote_file_command
+ local remote_link_command
printf -v remote_path_q "%q" "${remote_path%/}"
+ remote_file_script="cd $remote_path_q && find . -type f -print | LC_ALL=C sort | while IFS= read -r file; do sha256sum \"\$file\"; done"
+ remote_link_script="cd $remote_path_q && find . -type l -print | LC_ALL=C sort | while IFS= read -r link; do printf \"%s -> %s\\n\" \"\$link\" \"\$(readlink \"\$link\")\"; done"
+ remote_file_command="'${remote_file_script//\'/\'\\\'\'}'"
+ remote_link_command="'${remote_link_script//\'/\'\\\'\'}'"
+
local local_files
local remote_files
local local_links
@@ -571,7 +580,7 @@ verify_remote() {
done
) > "$local_files"
- if ! ssh "$remote_host" "cd $remote_path_q && find . -type f -print | LC_ALL=C sort | while IFS= read -r file; do sha256sum \"\$file\"; done" > "$remote_files"; then
+ if ! ssh "$remote_host" "bash -lc $remote_file_command" > "$remote_files"; then
echo "❌ ERROR: Remote checksum collection failed"
rm -f "$local_files" "$remote_files" "$local_links" "$remote_links"
return 1
@@ -590,7 +599,7 @@ verify_remote() {
done
) > "$local_links"
- if ! ssh "$remote_host" "cd $remote_path_q && find . -type l -print | LC_ALL=C sort | while IFS= read -r link; do printf \"%s -> %s\\n\" \"\$link\" \"\$(readlink \"\$link\")\"; done" > "$remote_links"; then
+ if ! ssh "$remote_host" "bash -lc $remote_link_command" > "$remote_links"; then
echo "❌ ERROR: Remote symlink collection failed"
rm -f "$local_files" "$remote_files" "$local_links" "$remote_links"
return 1