aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-08-30 16:04:24 +0100
committerFrancis Rowe <info@gluglug.org.uk>2015-08-30 16:04:24 +0100
commit4c15117d2b2a7b8e9dc2967992fe9b742602ee27 (patch)
tree8f95c8152392a0dc8c356f3636812e56f0c1eeab
parent09fe37e979847cd83a581698366270224c68babd (diff)
downloadlibrebootfr-4c15117d2b2a7b8e9dc2967992fe9b742602ee27.tar.gz
librebootfr-4c15117d2b2a7b8e9dc2967992fe9b742602ee27.zip
build/config/coreboot*: unify config path
-rwxr-xr-xresources/scripts/helpers/build/config/corebootmodify10
-rwxr-xr-xresources/scripts/helpers/build/config/corebootreplace8
-rwxr-xr-xresources/scripts/helpers/build/config/corebootupdate10
3 files changed, 17 insertions, 11 deletions
diff --git a/resources/scripts/helpers/build/config/corebootmodify b/resources/scripts/helpers/build/config/corebootmodify
index 353840d4..dc866532 100755
--- a/resources/scripts/helpers/build/config/corebootmodify
+++ b/resources/scripts/helpers/build/config/corebootmodify
@@ -25,27 +25,29 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
+configpath="resources/libreboot/config/grub"
+
hackconfig () {
cd "coreboot/"
printf "Modifying config for %s\n" "${1}"
sleep 2
- if [ ! -d "../resources/libreboot/config/grub/${1}/" ]; then
+ if [ ! -d "../${configpath}/${1}/" ]; then
printf "build/config/corebootmodify WARNING: config '%s' does not exist. Skipping.\n" "${1}"
cd "../"
return
fi
- mv "../resources/libreboot/config/grub/${1}/config" ".config"
+ mv "../${configpath}/${1}/config" ".config"
make menuconfig
- mv ".config" "../resources/libreboot/config/grub/${1}/config"
+ mv ".config" "../${configpath}/${1}/config"
cd "../"
}
if [ $# -lt 1 ]; then
- for config in resources/libreboot/config/grub/*; do hackconfig "${config##*/}"; done
+ for config in ${configpath}/*; do hackconfig "${config##*/}"; done
else
for config in "${@}"; do hackconfig "${config}"; done
fi
diff --git a/resources/scripts/helpers/build/config/corebootreplace b/resources/scripts/helpers/build/config/corebootreplace
index 0c41c9e1..36d45584 100755
--- a/resources/scripts/helpers/build/config/corebootreplace
+++ b/resources/scripts/helpers/build/config/corebootreplace
@@ -25,6 +25,8 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
+configpath="resources/libreboot/config/grub"
+
hackconfig () {
cd "coreboot/"
@@ -33,14 +35,14 @@ hackconfig () {
make menuconfig
- [ ! -d "../resources/libreboot/config/grub/${1}/" ] && mkdir -p "../resources/libreboot/config/grub/${1}/"
- mv ".config" "../resources/libreboot/config/grub/${1}/config"
+ [ ! -d "../${configpath}/${1}/" ] && mkdir -p "../${configpath}/${1}/"
+ mv ".config" "../${configpath}/${1}/config"
cd "../"
}
if [ $# -lt 1 ]; then
- for config in resources/libreboot/config/grub/*; do hackconfig "${config##*/}"; done
+ for config in ${configpath}/*; do hackconfig "${config##*/}"; done
else
for config in "${@}"; do hackconfig "${config}"; done
fi
diff --git a/resources/scripts/helpers/build/config/corebootupdate b/resources/scripts/helpers/build/config/corebootupdate
index 6f55eb0c..63902534 100755
--- a/resources/scripts/helpers/build/config/corebootupdate
+++ b/resources/scripts/helpers/build/config/corebootupdate
@@ -25,27 +25,29 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
+configpath="resources/libreboot/config/grub"
+
hackconfig () {
cd "coreboot/"
printf "Updating config for %s\n" "${1}"
sleep 2
- if [ ! -d "../resources/libreboot/config/grub/${1}/" ]; then
+ if [ ! -d "../${configpath}/${1}/" ]; then
printf "build/config/corebootupdate WARNING: config '%s' does not exist. Skipping.\n" "${1}"
cd "../"
return
fi
- mv "../resources/libreboot/config/grub/${1}/config" ".config"
+ mv "../${configpath}/${1}/config" ".config"
make oldconfig
- mv ".config" "../resources/libreboot/config/grub/${1}/config"
+ mv ".config" "../${configpath}/${1}/config"
cd "../"
}
if [ $# -lt 1 ]; then
- for config in resources/libreboot/config/grub/*; do hackconfig "${config##*/}"; done
+ for config in ${configpath}/*; do hackconfig "${config##*/}"; done
else
for config in "${@}"; do hackconfig "${config}"; done
fi