Add update-patches target

This commit is contained in:
Matthias Schiffer 2013-12-28 15:31:11 +01:00
parent 1117cc39de
commit 1cc0948597
6 changed files with 35 additions and 16 deletions

View File

@ -28,6 +28,10 @@ patch: FORCE
unpatch: FORCE
$(GLUONDIR)/scripts/unpatch.sh $(GLUONDIR)
update-patches: FORCE
$(GLUONDIR)/scripts/update-patches.sh $(GLUONDIR)
$(GLUONDIR)/scripts/patch.sh $(GLUONDIR)
-include $(TOPDIR)/include/host.mk
_SINGLE=export MAKEFLAGS=$(space);

View File

@ -1,5 +1,5 @@
From 9331b9e86ff3cd1a368ba61721c1555807fa772e Mon Sep 17 00:00:00 2001
Message-Id: <9331b9e86ff3cd1a368ba61721c1555807fa772e.1388167228.git.mschiffer@universe-factory.net>
From e541a190d4f54d35043a804f42af746793181405 Mon Sep 17 00:00:00 2001
Message-Id: <e541a190d4f54d35043a804f42af746793181405.1388240789.git.mschiffer@universe-factory.net>
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Fri, 27 Dec 2013 18:48:19 +0100
Subject: [PATCH] Make Unifi images flashable

View File

@ -3,12 +3,12 @@
set -e
shopt -s nullglob
. $1/modules
. "$1"/modules
for module in $GLUON_MODULES; do
dir=$1/$module
dir="$1"/$module
git -C $dir checkout -B patched base
if [ -z $1/patches/$module/*.patch ]; then continue; fi
git -C $dir am $1/patches/$module/*.patch
if [ -z "$1"/patches/$module/*.patch ]; then continue; fi
git -C "$dir" am "$1"/patches/$module/*.patch
done

View File

@ -2,9 +2,9 @@
set -e
. $1/modules
. "$1"/modules
for module in $GLUON_MODULES; do
dir=$1/$module
git -C $dir checkout base
dir="$1"/$module
git -C "$dir" checkout base
done

15
scripts/update-patches.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
set -e
shopt -s nullglob
. "$1"/modules
for module in $GLUON_MODULES; do
dir="$1"/$module
git -C "$dir" checkout patched
rm -f "$1"/patches/$module/*.patch
mkdir -p "$1"/patches/$module
git -C "$dir" format-patch -o "$1"/patches/$module base
done

View File

@ -2,15 +2,15 @@
set -e
. $1/modules
. "$1"/modules
for module in $GLUON_MODULES; do
dir=$1/$module
mkdir -p $dir
var=$(echo "$module" | tr '[:lower:]/' '[:upper:]_')
dir="$1"/$module
mkdir -p "$dir"
var=$(echo $module | tr '[:lower:]/' '[:upper:]_')
eval repo=\${MODULE_${var}_REPO}
eval commit=\${MODULE_${var}_COMMIT}
git -C $dir init
git -C $dir fetch $repo
git -C $dir checkout -B base $commit
git -C "$dir" init
git -C "$dir" fetch $repo
git -C "$dir" checkout -B base $commit
done