Commit 4a1ff800 authored by Rafaël Carré's avatar Rafaël Carré

contrib/change_prefix.sh: don't run sed on binary files

parent 18d13c34
......@@ -43,16 +43,20 @@ else
new_prefix=$2
fi
# process [dir] [filemask]
# process [dir] [filemask] [text only]
process() {
for file in `find $1 -maxdepth 1 -type f -name "$2"`
do
if [ -n "$3" ]
then
file $file | sed "s/^.*: //" | grep -q 'text\|shell' || continue
fi
echo "Fixing up $file"
sed -i.orig -e "s,$old_prefix,$new_prefix,g" $file
rm -f $file.orig
done
}
process bin/ "*"
process bin/ "*" check
process lib/ "*.la"
process lib/pkgconfig/ "*.pc"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment