blob: d062e1f5dc59b4d84e19ad660dac674e4ebf9a4f (
plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
--- install.sh.old 2004-05-24 08:31:08.000000000 -0500
+++ install.sh 2004-09-29 13:59:04.911944000 -0500
@@ -23,11 +23,12 @@
RC="${RC:-/etc/bins}"
GLOBAL_RC="$RC"
+SHARE="${PREFIX}/share"
DESTDIR=`echo "$DESTDIR"|sed 's%/$%%'`
PREFIX=$DESTDIR/`echo "$PREFIX"|sed 's%^/%%'`
PREFIX=`echo "$PREFIX"|sed 's%/$%%'`
-RC=$DESTDIR/`echo "$RC"|sed 's%^/%%'`
-RC=`echo "$RC"|sed 's%/$%%'`
+DESTRC=$DESTDIR/`echo "$RC"|sed 's%^/%%'`
+DESTRC=`echo "$DESTRC"|sed 's%/$%%'`
BIN="$PREFIX/bin"
SHARE="$PREFIX/share"
@@ -58,7 +59,7 @@
Press Enter to go on or Crtl-C to stop now...
!EoF
-read dummy
+#read dummy
install_binaries()
{
@@ -84,20 +85,20 @@
install_config()
{
- mkdir -p $RC 2>/dev/null || true
- if [ -w $RC ]; then
+ mkdir -p $DESTRC 2>/dev/null || true
+ if [ -w $DESTRC ]; then
echo "Installing configuration file in $RC"
- cp binsrc $RC
+ cp binsrc $DESTRC
for T in $templates
do
- if [ -d "$RC/templates.$T" ]; then
+ if [ -d "$DESTRC/templates.$T" ]; then
echo "Removing old template.$T in $RC"
- rm -Rf "$RC/templates.$T"
+ rm -Rf "$DESTRC/templates.$T"
fi
done
- chmod -R a+r $RC/*
+ chmod -R a+r $DESTRC/*
else
- echo "Cannot write to $RC."
+ echo "Cannot write to $DESTRC."
return 1
fi
}
@@ -179,16 +180,9 @@
fi
# bash completion
-if [ -w /etc/bash_completion.d ] ; then
- echo "Installing bash completion system wide."
- cp -f bash_completion /etc/bash_completion.d/bins
-else
- mkdir ~/.bash_completion 2>/dev/null || true
- if [ -w ~/.bash_completion ] ; then
- echo "Installing bash completion for user `whoami`."
- cp -f bash_completion ~/.bash_completion/bins
- fi
-fi
+echo "Installing bash completion system wide."
+mkdir -p $SHARE/bash-completion
+cp -f bash_completion $SHARE/bash-completion/bins
# I18N files
mkdir -p $LOCALE 2>/dev/null || true
|