We now ship a directory within our grub template directory for our theme.
This will result in an sed error 'not a regular file' as the directory is
indeed no regular file. This make sure that the file used by sed is a regular
file.
# adjust all variables in the templates with the according distribution information
for file in "${BUILD_OUTPUT}"/boot/isolinux/*.cfg "${BUILD_OUTPUT}"/boot/isolinux/*.msg \
"${BUILD_OUTPUT}"/boot/grub/* ; do
# adjust all variables in the templates with the according distribution information
for file in "${BUILD_OUTPUT}"/boot/isolinux/*.cfg "${BUILD_OUTPUT}"/boot/isolinux/*.msg \
"${BUILD_OUTPUT}"/boot/grub/* ; do
- if [ -r "${file}" ] ; then
+ if [ -r "${file}" ] && [ -f "${file}" ] ; then
sed -i "s/%ARCH%/$ARCH/g" "${file}"
sed -i "s/%DATE%/$DATE/g" "${file}"
sed -i "s/%DISTRI_INFO%/$DISTRI_INFO/g" "${file}"
sed -i "s/%ARCH%/$ARCH/g" "${file}"
sed -i "s/%DATE%/$DATE/g" "${file}"
sed -i "s/%DISTRI_INFO%/$DISTRI_INFO/g" "${file}"