File tree Expand file tree Collapse file tree 3 files changed +50
-8
lines changed Expand file tree Collapse file tree 3 files changed +50
-8
lines changed Original file line number Diff line number Diff line change @@ -47,4 +47,6 @@ perl/*.inl
47
47
* .out
48
48
* .snm
49
49
* .toc
50
+ latex /xdi.log
51
+ latex /xdi.pdf
50
52
doc /Poster_XAFS15 /XDI_Poster.log
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # #################################################
3
+ # # install magic for recognizing XDI files into
4
+ # # system magic file
5
+ # #################################################
6
+ # # this must be run as root/sudo
7
+ # #################################################
8
+
9
+
10
+ showhelp () {
11
+ echo "
12
+ install_magic: append file magic for XDI file to system magic file
13
+
14
+ install_magic [filename] [-h]
15
+ filename specify location of system magic file (default=/etc/magic)
16
+ -h show this help
17
+ "
18
+ }
19
+
20
+ # # ======== identify system file =========================
21
+ system_file=/etc/magic
22
+ if [ $1 ]; then
23
+ system_file=$1
24
+ fi
25
+ if [ " $system_file " = ' -h' ]; then
26
+ showhelp
27
+ exit 0
28
+ fi
29
+ tempfile=./system.magic
30
+
31
+ # # ======== sanity checking ==============================
32
+ if [ ` whoami` != ' root' ]; then
33
+ echo " install_magic: this script must be run as root"
34
+ exit 0
35
+ fi
36
+
37
+ if [ ! -e $system_file ]; then
38
+ echo " install_magic: magic file not found at '$system_file '"
39
+ exit 0
40
+ fi
41
+
42
+ # # ======== append XDi magic to system file ==============
43
+ cp $system_file $tempfile # make a copy of the system magic file
44
+ sed -i " /# ----- XDI/,/# ----- XDI/ d" $tempfile # remove any previous definition of an XDI file
45
+ cat $tempfile magic > $system_file # concatinate system file with XDI definition
46
+ rm $tempfile # remove copy of old system file
Original file line number Diff line number Diff line change 1
- #----------------------------------------------------------------------------------
2
- # file(1) magic for XAS Data Interchange (XDI) files
3
- #
4
- # Installation: append this file to the end of /etc/magic, or see
5
- # `man 1 file' for details of the file magic system
6
- # on your computer
7
- #
8
- # ----- XDI files
1
+ # ----- XDI files: file(1) magic for XAS Data Interchange (XDI) files
9
2
#
10
3
0 string #\ XDI/ XAS Data Interchange file
11
4
>&0 regex [0-9.]+ -- XDI specification %s
5
+ # ----- XDI files
You can’t perform that action at this time.
0 commit comments