Reorganize repo: move scripts to contrib/scripts/, clean up .gitignore, untrack backup files

This commit is contained in:
dan_s
2026-02-26 19:42:28 -06:00
parent 10a1b27de1
commit 896fa9c107
35 changed files with 363 additions and 19505 deletions

View File

@@ -32,7 +32,19 @@ check_and_clean_target() {
TRIPLET=$(./depends/config.guess 2>/dev/null || true)
if [[ -n "$TRIPLET" && -d "depends/$TRIPLET" ]]; then
echo "Cleaning depends/$TRIPLET to avoid path contamination..."
rm -rf "depends/$TRIPLET" "depends/built/$TRIPLET"
# Use sudo if files are root-owned (from Docker builds)
if [[ "$(stat -c '%u' "depends/$TRIPLET" 2>/dev/null)" == "0" ]]; then
sudo rm -rf "depends/$TRIPLET" "depends/built/$TRIPLET"
else
rm -rf "depends/$TRIPLET" "depends/built/$TRIPLET"
fi
elif [[ -n "$TRIPLET" && -d "depends/built/$TRIPLET" ]]; then
echo "Cleaning depends/built/$TRIPLET to avoid path contamination..."
if [[ "$(stat -c '%u' "depends/built/$TRIPLET" 2>/dev/null)" == "0" ]]; then
sudo rm -rf "depends/built/$TRIPLET"
else
rm -rf "depends/built/$TRIPLET"
fi
fi
echo "Clean complete."
fi
@@ -56,7 +68,9 @@ if [[ "${1:-}" == "--linux-release" ]]; then
echo "Building Linux release inside Ubuntu 20.04 Docker container..."
sudo docker build -t hush-builder -f Dockerfile.build .
sudo docker run --rm -e HOST_UID=$(id -u) -e HOST_GID=$(id -g) -v "$SCRIPT_DIR:/hush3" hush-builder "$@"
echo "Docker build complete. Release is in release/linux-<ubuntu_version>/"
VERSION=$(grep -oP 'define\(_CLIENT_VERSION.*?,\s*\K[0-9]+' configure.ac | head -3 | tr '\n' '.' | sed 's/\.$//')
VERSION=${VERSION:-3.10.5}
echo "Docker build complete. Release is in release/${VERSION}-linux-amd64/"
exit $?
fi