mirror of
https://github.com/aaddrick/claude-desktop-debian.git
synced 2026-05-17 08:36:35 +03:00
Splits the 2124-line build.sh into a 318-line orchestrator plus
16 topical modules, grouped so CODEOWNERS can assign per-subsystem
reviewers:
scripts/_common.sh shared shell utilities
scripts/setup/ host detection, deps, download
scripts/patches/ regex patches on minified JS
_common.sh extract_electron_variable etc.
app-asar.sh wrapper injection
titlebar.sh
tray.sh menu handler + icon selection
quick-window.sh
claude-code.sh
cowork.sh cowork linux patching (largest)
scripts/staging/ post-patch file staging
build.sh now sources each module in dependency order and retains
only run_packaging, cleanup_build, print_next_steps, and main.
All globals stay at the top of build.sh and are read by sourced
modules; each module's header documents which globals it reads and
mutates (implicit-contract documentation).
This is a pure-move refactor. Function bodies were copied verbatim
— verified by byte-identical diff of the function set vs the
pre-split build.sh (34 functions, all present with identical bodies).
Note: .github/workflows/shellcheck.yml may benefit from a '-x' flag
so shellcheck follows the new '# shellcheck source=' directives, but
that CI tweak is left as a separate concern.
Co-Authored-By: Claude <claude@anthropic.com>
35 lines
1.0 KiB
Bash
35 lines
1.0 KiB
Bash
#===============================================================================
|
|
# SSH helper staging: copy architecture-specific claude-ssh binary into the
|
|
# Electron resources directory.
|
|
#
|
|
# Sourced by: build.sh
|
|
# Sourced globals:
|
|
# claude_extract_dir, electron_resources_dest, architecture
|
|
# Modifies globals: (none)
|
|
#===============================================================================
|
|
|
|
copy_ssh_helpers() {
|
|
section_header 'SSH Helpers'
|
|
|
|
local ssh_src="$claude_extract_dir/lib/net45/resources/claude-ssh"
|
|
local ssh_dest="$electron_resources_dest/claude-ssh"
|
|
local binary_name="claude-ssh-linux-$architecture"
|
|
|
|
if [[ ! -d "$ssh_src" ]]; then
|
|
echo "Warning: SSH helpers not found at $ssh_src"
|
|
section_footer 'SSH Helpers'
|
|
return
|
|
fi
|
|
|
|
mkdir -p "$ssh_dest" || exit 1
|
|
cp "$ssh_src/version.txt" "$ssh_dest/" || exit 1
|
|
cp "$ssh_src/$binary_name" "$ssh_dest/" || exit 1
|
|
chmod +x "$ssh_dest/$binary_name"
|
|
|
|
echo "Copied SSH helper files:"
|
|
echo " version.txt"
|
|
echo " $binary_name"
|
|
|
|
section_footer 'SSH Helpers'
|
|
}
|