Files
camoufox/scripts/copy-additions.sh
T
Jake WriterandClaude Opus 5.5 be9f38b08e chore: remove build tooling nothing uses
- The developer UI (scripts/developer.py, `make edits`). It depended on
  easygui, which no requirements file declares, and every action it offered is
  a Makefile target: patch, unpatch, workspace, revert, diff. Its two helpers in
  scripts/_mixin.py (is_bootstrap_patch, patch) had no other callers.
- legacy/, the Go launcher deprecated in 2024-11. Nothing built or shipped it.
  Its Makefile targets and scripts/run-pw.py go with it, and so does Go from
  every dependency list and workflow.
- jsonvv/ and settings/camoucfg.jvv. Nothing read the .jvv schema: config is
  validated against settings/properties.json, and the two had already drifted.
  The jsonvv package stays on PyPI.
- Scripts with no caller: bootstrap.py, moztree, setup-wasi-linux.sh,
  package-helper.sh, install-local-build.sh, mozfetch.sh (copied into lw/ but
  never packaged), examples/.
- The pre-ESM Juggler copies JugglerFrameParent.jsm and JugglerFrameChild.jsm,
  and hidden-scrollbars.css. Juggler loads the .sys.mjs actors and deliberately
  no stylesheet, but jar.mn still packaged all three.
- patches/librewolf/*.opt, which list_patches() never picks up; the roverfox
  second pass in patch.py, whose directory no longer exists; the unread
  --no-settings-pane option.
- The CAMOUFOX_PASSWD secret passed to `make fetch` and closedsrc_rev in
  upstream.sh, which nothing reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 15:20:45 -06:00

66 lines
2.1 KiB
Bash

#!/bin/bash
# Simple bash script that copies the additions from the repository into the source directory
# Must be ran from within the source directory
# Check if correct number of arguments are provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <version> <release>"
exit 1
fi
# Assign command-line arguments to variables
version="$1"
release="$2"
# Function to run commands and exit on failure
run() {
echo "$ $1"
eval "$1"
if [ $? -ne 0 ]; then
echo "Command failed: $1"
exit 1
fi
}
# Copy the search-config.json file.
# FF150 removed the bundled RemoteSettings dumps tree (services/settings/dumps/
# no longer ships in the source tarball — search config is fetched at runtime),
# so the destination dir must be created first. Shipping the empty stub keeps
# Camoufox's "no bundled search engines" intent and is harmless if unread.
run 'mkdir -p services/settings/dumps/main'
run 'cp -v ../assets/search-config.json services/settings/dumps/main/search-config.json'
# vs_pack.py issue... should be temporary
# FF150 no longer ships build/vs/ in the source tree, so create it first
# (this helper is only consumed by the Windows MSVC packaging path).
run 'mkdir -p build/vs'
run 'cp -v ../patches/librewolf/pack_vs.py build/vs/'
# Apply most recent `settings` repository files
run 'mkdir -p lw'
pushd lw > /dev/null
run 'cp -v ../../settings/camoufox.cfg .'
run 'cp -v ../../settings/distribution/policies.json .'
run 'cp -v ../../settings/defaults/pref/local-settings.js .'
run 'cp -v ../../settings/chrome.css .'
run 'cp -v ../../settings/properties.json .'
run 'touch moz.build'
popd > /dev/null
# Generate Assets.car for macOS builds (if on macOS) or ensure it exists
if [[ ! -f ../additions/browser/branding/camoufox/Assets.car ]]; then
echo "Generating Assets.car..."
bash ../scripts/generate-assets-car.sh
fi
# Copy ALL new files/folders from ../additions to .
run 'cp -r ../additions/* .'
# Provide a script that fetches and bootstraps Nightly and some mozconfigs
# Override the firefox version
for file in "browser/config/version.txt" "browser/config/version_display.txt"; do
echo "${version}-${release}" > "$file"
done