Line 0
Link Here
|
|
|
1 |
--- install.orig 2009-11-08 21:53:11 UTC |
2 |
+++ install |
3 |
@@ -36,12 +36,12 @@ manInstall(){ |
4 |
#$3 = VERSION |
5 |
|
6 |
#makes the man dir if it does not exist |
7 |
- if /bin/[ ! -d "$1/man" ]; then |
8 |
- /bin/mkdir "$1/man" |
9 |
- /bin/chmod 755 "$1/man" |
10 |
+ if /bin/[ ! -d "${DESTDIR}$1/man" ]; then |
11 |
+ /bin/mkdir "${DESTDIR}$1/man" |
12 |
+ /bin/chmod 755 "${DESTDIR}$1/man" |
13 |
fi |
14 |
|
15 |
- manInstallTMPfile=/tmp/`shortRandom``shortRandom``shortRandom`$$`shortRandom` |
16 |
+ manInstallTMPfile=_tmpfile |
17 |
/usr/bin/touch $manInstallTMPfile |
18 |
/bin/chmod go-rwx $manInstallTMPfile |
19 |
|
20 |
@@ -72,9 +72,9 @@ manInstall(){ |
21 |
|
22 |
|
23 |
#makes the man section dir if it does not exist |
24 |
- if /bin/[ ! -d $1/man/man$manInstallMANsection ]; then |
25 |
- /bin/mkdir "$1/man/man$manInstallMANsection" |
26 |
- /bin/chmod 755 "$1/man/man$manInstallMANsection" |
27 |
+ if /bin/[ ! -d ${DESTDIR}$1/man/man$manInstallMANsection ]; then |
28 |
+ /bin/mkdir "${DESTDIR}$1/man/man$manInstallMANsection" |
29 |
+ /bin/chmod 755 "${DESTDIR}$1/man/man$manInstallMANsection" |
30 |
fi |
31 |
|
32 |
#echo $line |
33 |
@@ -82,7 +82,7 @@ manInstall(){ |
34 |
#echo $MANsection |
35 |
#echo $MANcenter |
36 |
|
37 |
- manInstallMANfile=`echo $1/man/man$manInstallMANsection/$manInstallMANname.$manInstallMANsection.gz | sed 's/\/\//\//g'` |
38 |
+ manInstallMANfile=`echo ${DESTDIR}$1/man/man$manInstallMANsection/$manInstallMANname.$manInstallMANsection.gz | sed 's/\/\//\//g'` |
39 |
|
40 |
/usr/local/bin/pod2man --section="$manInstallMANsection" --release="$3" --name="$manInstallMANname" --center="$manInstallMANcenter" "$manInstallLine" | /usr/bin/gzip > "$manInstallMANfile" |
41 |
|
42 |
@@ -97,17 +97,17 @@ manInstall(){ |
43 |
binInstall(){ |
44 |
#$1 = prefix |
45 |
|
46 |
- if /bin/[ ! -d "$1/bin" ]; then |
47 |
- /bin/mkdir "$1/bin" |
48 |
- if /bin/[ ! -d $1/bin ]; then |
49 |
- echo "$1/bin does not a dir or does not exist and could not be created" |
50 |
+ if /bin/[ ! -d "${DESTDIR}$1/bin" ]; then |
51 |
+ /bin/mkdir "${DESTDIR}$1/bin" |
52 |
+ if /bin/[ ! -d ${DESTDIR}$1/bin ]; then |
53 |
+ echo "${DESTDIR}$1/bin does not a dir or does not exist and could not be created" |
54 |
exit 1; |
55 |
fi |
56 |
- /bin/chmod u+rwx "$1/bin" |
57 |
+ /bin/chmod u+rwx "${DESTDIR}$1/bin" |
58 |
|
59 |
fi |
60 |
|
61 |
- binInstallTMPfile=/tmp/`shortRandom``shortRandom``shortRandom`$$`shortRandom` |
62 |
+ binInstallTMPfile=_tmpfile |
63 |
/usr/bin/touch $binInstallTMPfile |
64 |
/bin/chmod go-rwx $binInstallTMPfile |
65 |
|
66 |
@@ -119,9 +119,9 @@ binInstall(){ |
67 |
while /bin/[ $binInstallCL -le $binInstallNOL ]; do |
68 |
binInstallLine=`getline $binInstallTMPfile $binInstallCL` |
69 |
|
70 |
- /bin/cat "./bin/$binInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "$1/bin/$binInstallLine" |
71 |
+ /bin/cat "./bin/$binInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "${DESTDIR}$1/bin/$binInstallLine" |
72 |
|
73 |
- /bin/chmod 755 "$1/bin/$binInstallLine" |
74 |
+ /bin/chmod 755 "${DESTDIR}$1/bin/$binInstallLine" |
75 |
|
76 |
binInstallCL=`/bin/expr $binInstallCL + 1` |
77 |
done |
78 |
@@ -132,7 +132,7 @@ binInstall(){ |
79 |
includeInstall(){ |
80 |
#$1 = prefix |
81 |
|
82 |
- includeInstallTMPfile=/tmp/`shortRandom``shortRandom``shortRandom`$$`shortRandom` |
83 |
+ includeInstallTMPfile=_tmpfile |
84 |
/usr/bin/touch $includeInstallTMPfile |
85 |
/bin/chmod go-rwx $includeInstallTMPfile |
86 |
|
87 |
@@ -145,13 +145,13 @@ includeInstall(){ |
88 |
includeInstallLine=`getline $includeInstallTMPfile $includeInstallCL` |
89 |
|
90 |
if /bin/[ -d $includeInstallLine ]; then |
91 |
- if /bin/[ ! -d "$1/$includeInstallLine" ]; then |
92 |
- mkdir "$1/$includeInstallLine" |
93 |
- chmod 755 "$1/$includeInstallLine" |
94 |
+ if /bin/[ ! -d "${DESTDIR}$1/$includeInstallLine" ]; then |
95 |
+ mkdir "${DESTDIR}$1/$includeInstallLine" |
96 |
+ chmod 755 "${DESTDIR}$1/$includeInstallLine" |
97 |
fi |
98 |
else |
99 |
- cat "$includeInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "$1/$includeInstallLine" |
100 |
- /bin/chmod 644 "$1/$includeInstallLine" |
101 |
+ cat "$includeInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "${DESTDIR}$1/$includeInstallLine" |
102 |
+ /bin/chmod 644 "${DESTDIR}$1/$includeInstallLine" |
103 |
fi |
104 |
|
105 |
includeInstallCL=`/bin/expr $includeInstallCL + 1` |