File: setup.sh

package info (click to toggle)
glhack 1.2-8.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,744 kB
  • sloc: ansic: 208,571; cpp: 13,139; yacc: 2,005; makefile: 1,152; lex: 377; sh: 121; awk: 89; sed: 11
file content (41 lines) | stat: -rw-r--r-- 1,191 bytes parent folder | download | duplicates (30)
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
36
37
38
39
40
41
#!/bin/sh
# Copy files to their correct locations.
#
# If arguments are given, try symbolic link first.  This is not the default
# so that most people will have the distribution versions stay around so
# subsequent patches can be applied.  People who pay enough attention to
# know there's a non-default behavior are assumed to pay enough attention
# to keep distribution versions if they modify things.

# Were we started from the top level?  Cope.
if [ -f sys/unix/Makefile.top ]; then cd sys/unix; fi

if [ $# -gt 0 ] ; then
#	First, try to make a symbolic link.
#
	ln -s Makefile.top Makefile >/dev/null 2>&1
	if [ $? -eq 0 ] ; then

		echo "Lucky you!  Symbolic links."
		rm -f Makefile

		umask 0
		ln -s sys/unix/Makefile.top ../../Makefile
		ln -s ../sys/unix/Makefile.dat ../../dat/Makefile
		ln -s ../sys/unix/Makefile.doc ../../doc/Makefile
		ln -s ../sys/unix/Makefile.src ../../src/Makefile
		ln -s ../sys/unix/Makefile.utl ../../util/Makefile
		exit 0
	fi
fi

#
#	Otherwise...

echo "Copying Makefiles."

cp Makefile.top ../../Makefile
cp Makefile.dat ../../dat/Makefile
cp Makefile.doc ../../doc/Makefile
cp Makefile.src ../../src/Makefile
cp Makefile.utl ../../util/Makefile