1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00
sortix--sortix/utils/cfion
2016-06-13 13:04:54 +02:00

14 lines
383 B
Bash
Executable file

#!/bin/sh
find / | \
grep -E '\.[[:digit:]]+\.cfi$' | \
sed -E 's/\.[[:digit:]]+\.cfi//g' |
sort -u |
while read program; do
echo "$program"
cfg "$program".*.cfi > "$program.cfg.new" 2>/dev/null
rm "$program".*.cfi
mv "$program.cfg.new" "$program.0.cfi"
if [ "$program" != "/bin/rm" ] && [ "$program" != "/bin/dash" ]; then
cp "$program.0.cfi" "$program.cfg"
fi
done