Skip to content
Snippets Groups Projects
Select Git revision
  • v2023.2.5-ffs
  • nrb/ex400-remove-wps
  • experimental default protected
  • nrb/airmax-test
  • v2023.2.4-ffs
  • nrb/ar9344-reset-sequence
  • autinerd/experimental-openwrt-24.10
  • v2023.2.3-ffs
  • v2023.2.2-ffs
  • v2023.2-ffs
  • v2023.1-ffs
  • v2022.1.4-ffs
  • feature/addMikrotikwAP
  • v2022.1.3-ffs
  • v2021.1.2-ffs
  • v2022.1.1-ffs
  • master protected
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • v2023.2.5-ffs0.1
  • experimental-2025-06-08
  • experimental-2025-06-08-base
  • experimental-2025-06-06
  • experimental-2025-06-06-base
  • experimental-2025-05-27
  • experimental-2025-05-27-base
  • experimental-2025-05-18
  • experimental-2025-05-18-base
  • experimental-2025-05-15
  • experimental-2025-05-15-base
  • experimental-2025-05-13
  • experimental-2025-05-13-base
  • experimental-2025-05-08
  • experimental-2025-05-08-base
  • experimental-2025-05-05
  • experimental-2025-05-05-base
  • experimental-2025-05-02
  • experimental-2025-05-02-base
  • experimental-2025-05-01
40 results

patch.sh

Blame
  • patch.sh 952 B
    #!/usr/bin/env bash
    # shellcheck enable=check-unassigned-uppercase
    
    set -e
    shopt -s nullglob
    
    [ "$GLUON_TMPDIR" ] && [ "$GLUON_PATCHESDIR" ] || exit 1
    
    . scripts/modules.sh
    
    
    mkdir -p "$GLUON_TMPDIR"
    
    GLUONDIR="$(pwd)"
    
    PATCHDIR="$GLUON_TMPDIR"/patching
    trap 'rm -rf "$PATCHDIR"' EXIT
    
    for module in $GLUON_MODULES; do
    	echo "--- Patching module '$module' ---"
    
    	git clone -s -b base --single-branch "$GLUONDIR/$module" "$PATCHDIR" 2>/dev/null
    
    	cd "$PATCHDIR"
    	for patch in "${GLUON_PATCHESDIR}/$module"/*.patch; do
    		git -c user.name='Gluon Patch Manager' -c user.email='gluon@void.example.com' -c commit.gpgsign=false am --whitespace=nowarn --committer-date-is-author-date "$patch"
    	done
    
    	cd "$GLUONDIR/$module"
    	git fetch "$PATCHDIR" 2>/dev/null
    	git checkout -B patched FETCH_HEAD >/dev/null
    
    	git config branch.patched.remote .
    	git config branch.patched.merge refs/heads/base
    
    	git submodule update --init --recursive
    
    	rm -rf "$PATCHDIR"
    done