Copy kconfigs and mangle path in spec

svn path=/trunk/; revision=573
This commit is contained in:
Andrew Gaffney 2008-09-04 12:44:33 +00:00
parent 1199ff88ac
commit 117f098842
3 changed files with 22 additions and 9 deletions

View file

@ -93,15 +93,12 @@ if [ -d "${TMPDIR}" ]; then
fi
fi
if ! mkdir -p "${TMPDIR}/specs"; then
echo "Couldn't create temp spec dir at ${TMPDIR}/specs!"
exit 1
fi
if ! mkdir -p "${TMPDIR}/log"; then
echo "Couldn't create log dir at ${TMPDIR}/log!"
exit 1
fi
for i in ${TMPDIR} ${TMPDIR}/specs ${TMPDIR}/kconfig ${TMPDIR}/log; do
if ! mkdir -p "${i}"; then
echo "Couldn't create dir ${i}!"
exit 1
fi
done
cd ${SPECS_DIR}
@ -109,6 +106,9 @@ for i in ${SPECS}; do
cp --parents ${i} ${TMPDIR}/specs/
done
cd ${KCONFIG_DIR}
find -type f -exec cp {} ${TMPDIR}/kconfig \;
cd ${TMPDIR}/specs
# Fix up specs with datestamp
@ -122,6 +122,13 @@ for i in $(find -name '*.spec'); do
if [ "${old_version_stamp}" = "${old_source_subpath}" ]; then
sed -i 's|^source_subpath: \(.\+-\).\+$|source_subpath: \1'${DATESTAMP}'|' ${i}
fi
kconfig_line=$(grep '^boot/kernel/[^/]\+/config:' ${i})
if [ -n "${kconfig_line}" ]; then
key=$(echo "${kconfig_line}" | cut -d: -f1)
filename=$(basename $(echo "${kconfig_line}" | cut -d: -f2))
sed -i "s|^${key}:.*\$|${key}: ${TMPDIR}/kconfig/${filename}|" ${i}
fi
done
# Create snapshot