summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2015-12-03 18:17:34 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-06-04 07:12:03 +0200
commiteedc947c87b2fba8887cb3ec49402142450980e2 (patch)
treea7ebfb2a0eae0578f47d9ed2a19421977f7f90b2
parent6a834ee4d4fac6c9f9ef52fb2b38bb6667865b5f (diff)
downloadOSELAS.Toolchain-eedc947c87b2fba8887cb3ec49402142450980e2.tar.gz
fixup_ptxconfigs.sh: improve fixup
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-xfixup_ptxconfigs.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/fixup_ptxconfigs.sh b/fixup_ptxconfigs.sh
index 3e69876..f260b34 100755
--- a/fixup_ptxconfigs.sh
+++ b/fixup_ptxconfigs.sh
@@ -302,6 +302,9 @@ fixup()
clear
+ # add any new variables so they can be replaced
+ ./p --force --ptxconfig="${config}" oldconfig < /dev/null || exit 1
+
local sed_magic=""
for var in ${!PTXCONF_@}; do
# remove tabs :)
@@ -309,7 +312,9 @@ fixup()
echo "${var}"="${!var}"
sed_magic="${sed_magic} $(get_replace "${var}")"
- unset "${var}"
+ if [ "${var}" != "PTXCONF_CONFIGFILE_VERSION" ]; then
+ unset "${var}"
+ fi
done
eval sed -i "${sed_magic}" "${config}"
@@ -322,6 +327,11 @@ fixup()
sed -i 's/PTXCONF__ptxconfig_MAGIC__=y//' "${config}"
./p --force --ptxconfig="${config}" oldconfig || exit 1
+
+ # fix PTXdist version
+ eval sed -i "$(get_replace PTXCONF_CONFIGFILE_VERSION)" \
+ -e "\"s~^\(\# PTXdist \).*~\1${PTXCONF_CONFIGFILE_VERSION}~\"" \
+ "${config}"
}
update()