cleanup-timestamp-macros: catch more mime-types

This commit is contained in:
Jürgen Buchmüller 2016-03-07 16:10:36 +01:00
parent ef4eeb978f
commit 8d7c58ef9e
1 changed files with 4 additions and 1 deletions

View File

@ -12,7 +12,10 @@ hook() {
# Clean up shell scripts, perl files, pkgconfig files etc. # Clean up shell scripts, perl files, pkgconfig files etc.
for f in $(grep -r -l -e "$strip" "$PKGDESTDIR" ); do for f in $(grep -r -l -e "$strip" "$PKGDESTDIR" ); do
mimetype=$(file --mime-type "$f" | awk '{ print $2 }') mimetype=$(file --mime-type "$f" | awk '{ print $2 }')
if [ "$mimetype" == "text/plain" -o "$mimetype" == "text/x-shellscript" ]; then if [ "$mimetype" == "text/plain" -o \
"$mimetype" == "text/x-makefile" -o \
"$mimetype" == "text/x-shellscript" -o \
"$mimetype" == "application/xml" ]; then
sed -i "$f" -e "s;$strip;;" sed -i "$f" -e "s;$strip;;"
msg_warn "Cleaned up ${f#${PKGDESTDIR}} ...\n" msg_warn "Cleaned up ${f#${PKGDESTDIR}} ...\n"
else else