diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2007-02-10 14:39:21 +0000 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2007-02-10 14:39:21 +0000 |
commit | 65e1210ca7903f1dc145e4341c0a766cd5df8a82 (patch) | |
tree | 60475e34e258f4b9972f46abbc1096dfc6723c14 /fixup_ptxconfigs.sh | |
parent | 9c010c39a82b3b2550fb91bd0c32a0409fb03aea (diff) | |
download | OSELAS.Toolchain-65e1210ca7903f1dc145e4341c0a766cd5df8a82.tar.gz OSELAS.Toolchain-65e1210ca7903f1dc145e4341c0a766cd5df8a82.tar.xz |
git-svn-id: https://svn.pengutronix.de/svn/oselas/toolchain/trunks/OSELAS.Toolchain-trunk@1969 f8d472c7-5700-0410-ac5a-87979cec3adf
Diffstat (limited to 'fixup_ptxconfigs.sh')
-rwxr-xr-x | fixup_ptxconfigs.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/fixup_ptxconfigs.sh b/fixup_ptxconfigs.sh new file mode 100755 index 0000000..b5d920b --- /dev/null +++ b/fixup_ptxconfigs.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +fixup() { + eval `echo ${1} | + sed -e "s/ptxconfigs\/\(.*\)_gcc-\(.*\)_glibc-\(.*\)_linux-\([^_-]*\).*\.ptxconfig/TARGET=\1 GCC=\2 GLIBC=\3 LINUX=\4/"` + + sed -i \ + -e "s/\(PTXCONF_GNU_TARGET\)=.*/\1=\"${TARGET}\"/" \ + -e "s/\(PTXCONF_CROSS_GCC_FIRST_VERSION\)=.*/\1=\"${GCC}\"/" \ + -e "s/\(PTXCONF_GLIBC_VERSION\)=.*/\1=\"${GLIBC}\"/" \ + -e "s/\(PTXCONF_KERNEL_HEADERS_VERSION\)=.*/\1=\"${LINUX}\"/" \ + ${1} +} + +# +# main() +# +if test -n "${1}"; then + fixup ${1} +else + for config in `find ptxconfigs -name "*.ptxconfig"`; do + fixup ${config} + done +fi
\ No newline at end of file |