aboutsummaryrefslogtreecommitdiffstats
path: root/magic.sh
blob: b1fd1baa8da2a82766a63d14884d0d0239624582 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

if [ ! -f /etc/magic ];
then
	echo "/etc/magic not found, skipped."
	exit 0
fi

grep "CVF formats" /etc/magic > /dev/null
if [ "$?" != "1" ];
then
	echo "/etc/magic contains already CVF magic numbers."
	exit 0
fi

echo "If you want to make the command file(1) recognize CVFs the magic numbers"
echo "can be added to the database /etc/magic automatically now."
echo -n "Do you want me to do this ? (Y/N) "
read ANS junk
if [ "$ANS" = y -o "$ANS" = Y ];
then
	cat patches/magic >> /etc/magic
fi

exit 0