Make module scripts use GLUONDIR and GLUON_SITEDIR
This fixes `make update` not working correctly when GLUON_SITEDIR is set manually.
This commit is contained in:
parent
334858f4cf
commit
8cfd64d2db
14
Makefile
14
Makefile
@ -25,19 +25,19 @@ export GLUON_TARGET
|
|||||||
|
|
||||||
|
|
||||||
update: FORCE
|
update: FORCE
|
||||||
$(GLUONDIR)/scripts/update.sh $(GLUONDIR)
|
$(GLUONDIR)/scripts/update.sh
|
||||||
$(GLUONDIR)/scripts/patch.sh $(GLUONDIR)
|
$(GLUONDIR)/scripts/patch.sh
|
||||||
|
|
||||||
patch: FORCE
|
patch: FORCE
|
||||||
$(GLUONDIR)/scripts/patch.sh $(GLUONDIR)
|
$(GLUONDIR)/scripts/patch.sh
|
||||||
|
|
||||||
unpatch: FORCE
|
unpatch: FORCE
|
||||||
$(GLUONDIR)/scripts/unpatch.sh $(GLUONDIR)
|
$(GLUONDIR)/scripts/unpatch.sh
|
||||||
|
|
||||||
update-patches: FORCE
|
update-patches: FORCE
|
||||||
$(GLUONDIR)/scripts/update.sh $(GLUONDIR)
|
$(GLUONDIR)/scripts/update.sh
|
||||||
$(GLUONDIR)/scripts/update-patches.sh $(GLUONDIR)
|
$(GLUONDIR)/scripts/update-patches.sh
|
||||||
$(GLUONDIR)/scripts/patch.sh $(GLUONDIR)
|
$(GLUONDIR)/scripts/patch.sh
|
||||||
|
|
||||||
-include $(TOPDIR)/include/host.mk
|
-include $(TOPDIR)/include/host.mk
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
. "$1"/modules
|
. "$GLUONDIR"/modules
|
||||||
[ ! -f "$1"/site/modules ] || . "$1"/site/modules
|
[ ! -f "$GLUON_SITEDIR"/site/modules ] || . "$GLUON_SITEDIR"/site/modules
|
||||||
|
|
||||||
GLUON_MODULES=openwrt
|
GLUON_MODULES=openwrt
|
||||||
|
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
set -e
|
set -e
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
|
|
||||||
. "$1"/scripts/modules.sh
|
. "$GLUONDIR"/scripts/modules.sh
|
||||||
|
|
||||||
for module in $GLUON_MODULES; do
|
for module in $GLUON_MODULES; do
|
||||||
cd "$1"/$module
|
cd "$GLUONDIR"/$module
|
||||||
git checkout -B patching base
|
git checkout -B patching base
|
||||||
|
|
||||||
if [ "$(echo "$1"/patches/$module/*.patch)" ]; then
|
if [ "$(echo "$GLUONDIR"/patches/$module/*.patch)" ]; then
|
||||||
git am --whitespace=nowarn "$1"/patches/$module/*.patch || (
|
git am --whitespace=nowarn "$GLUONDIR"/patches/$module/*.patch || (
|
||||||
git am --abort
|
git am --abort
|
||||||
git checkout patched
|
git checkout patched
|
||||||
git branch -D patching
|
git branch -D patching
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
. "$1"/scripts/modules.sh
|
. "$GLUONDIR"/scripts/modules.sh
|
||||||
|
|
||||||
for module in $GLUON_MODULES; do
|
for module in $GLUON_MODULES; do
|
||||||
cd "$1"/$module
|
cd "$GLUONDIR"/$module
|
||||||
git checkout base
|
git checkout base
|
||||||
done
|
done
|
||||||
|
@ -3,17 +3,17 @@
|
|||||||
set -e
|
set -e
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
|
|
||||||
. "$1"/scripts/modules.sh
|
. "$GLUONDIR"/scripts/modules.sh
|
||||||
|
|
||||||
for module in $GLUON_MODULES; do
|
for module in $GLUON_MODULES; do
|
||||||
rm -f "$1"/patches/$module/*.patch
|
rm -f "$GLUONDIR"/patches/$module/*.patch
|
||||||
mkdir -p "$1"/patches/$module
|
mkdir -p "$GLUONDIR"/patches/$module
|
||||||
|
|
||||||
cd "$1"/$module
|
cd "$GLUONDIR"/$module
|
||||||
|
|
||||||
n=0
|
n=0
|
||||||
for commit in $(git rev-list --reverse --no-merges base..patched); do
|
for commit in $(git rev-list --reverse --no-merges base..patched); do
|
||||||
let n=n+1
|
let n=n+1
|
||||||
git show --pretty=format:'From: %an <%ae>%nDate: %aD%nSubject: %B' $commit > "$1"/patches/$module/"$(printf '%04u' $n)-$(git show -s --pretty=format:%f $commit).patch"
|
git show --pretty=format:'From: %an <%ae>%nDate: %aD%nSubject: %B' $commit > "$GLUONDIR"/patches/$module/"$(printf '%04u' $n)-$(git show -s --pretty=format:%f $commit).patch"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
. "$1"/scripts/modules.sh
|
. "$GLUONDIR"/scripts/modules.sh
|
||||||
|
|
||||||
for module in $GLUON_MODULES; do
|
for module in $GLUON_MODULES; do
|
||||||
var=$(echo $module | tr '[:lower:]/' '[:upper:]_')
|
var=$(echo $module | tr '[:lower:]/' '[:upper:]_')
|
||||||
@ -10,8 +10,8 @@ for module in $GLUON_MODULES; do
|
|||||||
eval branch=\${${var}_BRANCH}
|
eval branch=\${${var}_BRANCH}
|
||||||
eval commit=\${${var}_COMMIT}
|
eval commit=\${${var}_COMMIT}
|
||||||
|
|
||||||
mkdir -p "$1"/$module
|
mkdir -p "$GLUONDIR"/$module
|
||||||
cd "$1"/$module
|
cd "$GLUONDIR"/$module
|
||||||
git init
|
git init
|
||||||
|
|
||||||
git checkout $commit 2>/dev/null || git fetch $repo $branch
|
git checkout $commit 2>/dev/null || git fetch $repo $branch
|
||||||
|
Loading…
Reference in New Issue
Block a user