fix: replace bad substitution \${} with \${NOCOLOR} in size_calculation#2
Open
roemer2201 wants to merge 22 commits into
Open
fix: replace bad substitution \${} with \${NOCOLOR} in size_calculation#2roemer2201 wants to merge 22 commits into
roemer2201 wants to merge 22 commits into
Conversation
Line 377 contained \${} which causes a bash "bad substitution" error,
silently swallowing the hint message when input size is not evenly
divisible. Also added the missing closing parenthesis.
https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum
…atches grep "FILE_NAME" matched both FILE_NAME= and INPUT_FILE_NAME=, grep "COMPRESSION" matched both COMPRESSION= and COMPRESSION_LEVEL=. Added ^ anchor so each pattern only matches its intended metadata key. https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum
Data transfer uses nc over TCP, so UDP monitoring (-u flag) is irrelevant. Removed -u from the two process-running checks to match check_remote_port_availability which already used -tln. https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum
grep -q \":PORT\" matched partial ports (e.g. :100 matched :10000). Changed to grep -qE with [^0-9] suffix so only the exact port number matches. https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum
Unquoted \${INPUT} and \${OUTPUT} in file, stat, and blockdev calls
are subject to word splitting. Also fixed two \${INPUT_SIZE=} typos
to \${INPUT_SIZE} in the same block.
https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum
Without -e the ANSI escape codes were printed as literal text instead of being interpreted as colors. https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum
fallocate pre-allocates the output file once before writing starts. Running it once per job caused redundant syscalls and potential conflicts when jobs ran in parallel. https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum
RANDOM is 0-32767, so RANDOM % 55001 is identical to RANDOM. The comments claimed a range of 10000-55000 which was never reachable. Simplified to REMOTE_PORT=$(( RANDOM + 10000 )) with accurate comment. https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum
Covers prerequisites, local clone/backup/restore (compressed and uncompressed), check scenarios, remote netcat/SSH modes, and additional options (-s, -j, -b, -d, -f). https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum
Covers file structure, coding conventions, metadata format, known limitations, and branch strategy. https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum
Sets shell=bash and disables SC2034 (unused color variables) and SC2207 (array splitting) which are intentional patterns in this codebase. https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum
Covers parallelization concept, dynamic pipe construction, metadata format, SSH multiplexing, port selection, and function overview. https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum
Provides 'make lint' to run ShellCheck on all scripts and 'make install-deps' for installing ShellCheck on Debian/Ubuntu. https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum
Lists all 13 fixes with commit hashes and short explanation of each bug and its impact. https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum
Adds check_cloned_image() which compares source and destination segment by segment via parallel SHA256 hashing, without requiring backup metadata or .sha256 files. New -j and -B options set job count and block size (defaults 4 / 1048576). Fills the previously empty SOURCE+DESTINATION branch and validates divisibility. Marks the local clone-check cells as done in README. https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum
Implements the missing remote_backup_commands function and wires the backup mode to transfer split parts to a remote host over netcat, mirroring the existing remote clone path. Metadata and free-space handling are made remote-aware via an append_metadata helper. https://claude.ai/code/session_01Snu46hRFQBRdJTC9DDGZ6r
…into claude/remote-netcat-uncompressed
Replaces the previously unimplemented section 4.6 with test commands for remote uncompressed backup (block device and file), including a fake-ssh stub recipe for validating the remote code path without an SSH server. https://claude.ai/code/session_01Snu46hRFQBRdJTC9DDGZ6r
…e-netcat-uncompressed
…' into claude/remote-netcat-uncompressed
Adds SSH/netcat remote support to the restore script: the backup parts live on the remote host and are streamed back to a local target device via netcat (remote sends, local receives). Metadata is read from the remote host. Uncompressed only; compressed remote backups are rejected. Also adds conv=notrunc to the reassembly dd so parallel writers no longer truncate each other when restoring to a regular file. https://claude.ai/code/session_01Snu46hRFQBRdJTC9DDGZ6r
Adds SSH support so source/backup/destination checks work when the backup parts or cloned target live on a remote host. Per-segment SHA256 hashes are computed locally and via SSH on the remote side and compared; no netcat data transfer is needed. Covers all three comparisons: - backup check (source local <-> backup remote .part) - restore check (backup remote .part <-> destination local) - clone check (source local <-> destination remote) Metadata is read from the remote host; compressed remote backups are rejected. Local checks (incl. the .sha256-based paths) are unchanged. https://claude.ai/code/session_01Snu46hRFQBRdJTC9DDGZ6r
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Line 377 contained ${} which causes a bash "bad substitution" error,
silently swallowing the hint message when input size is not evenly
divisible. Also added the missing closing parenthesis.
https://claude.ai/code/session_015DcyEK7Zc8YCewMCV9Ayum