summaryrefslogtreecommitdiffstats
path: root/source/a/file/recompile_magic.mgc.sh
blob: 2ae5ca3976e8cb3d95b76d7943c7884683f573e3 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
#
# Recompile the /etc/file/magic.mgc database.
# This should be done after any additions or changes to the files
# in /etc/file/magic/.

if [ ! "$UID" = "0" ]; then
  echo "Error:  must be root to recompile the system magic.mgc"
  exit 1
fi

cd /etc/file
/usr/bin/file --compile