-
Notifications
You must be signed in to change notification settings - Fork 0
/
fixunix.sh
35 lines (28 loc) · 963 Bytes
/
fixunix.sh
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
26
27
28
29
30
31
32
33
34
35
#! /bin/sh
#
# Sets up the JGMOD package for building under Unix, converting text
# files from CR/LF to LF format.
echo "Converting JGMOD files to Unix format..."
find . -type f "(" \
-name "*.c" -o -name "*.cfg" -o -name "*.cpp" -o -name "*.dep" -o \
-name "*.h" -o -name "*.hin" -o -name "*.in" -o -name "*.inc" -o \
-name "*.m4" -o -name "*.mft" -o -name "*.s" -o -name "*.sh" -o \
-name "*.spec" -o -name "*.pl" -o -name "*.txt" -o -name "*._tx" -o \
-name "makefile.*" -o -name "plugins.*" -o -name "*.scu" -o -name "readme.*" \
")" \
-exec sh -c "echo {};
mv {} _tmpfile;
tr -d \\\r < _tmpfile > {};
touch -r _tmpfile {};
rm _tmpfile" \;
chmod +x *.sh
echo
echo "Done!"
echo
echo "Now 'cd src'"
echo "Then run make."
echo
echo \# generated by fixunix.sh > ./src/makefile
echo include makefile.lnx >> ./src/makefile
echo \# generated by fixunix.sh > ./examples/makefile
echo include makefile.lnx >> ./examples/makefile