File: localinstall.sh

package info (click to toggle)
ccbuild 1.5.7-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,208 kB
  • ctags: 441
  • sloc: cpp: 4,817; sh: 1,195; makefile: 53; ansic: 43
file content (61 lines) | stat: -rw-r--r-- 1,247 bytes parent folder | download | duplicates (3)
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
#!/bin/sh

echo "#"
echo "#"
echo "#        Small install script"
echo "# This program is distributed in the hope that it will be useful,"
echo "# but WITHOUT ANY WARRANTY; without even the implied warranty of"
echo "# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
echo "#"
echo "#"

which aap >/dev/null && echo "You seem to have A-A-P, I recommend you press CRTL-C and read INSTALL on how to use this instead." && echo "Press return to continue anyway..." && read

make -j2 || exit 1;
strip -s src/ccbuild;

function binDir()
{
  #Determine BINDIR
  #Find another installation directory
  IFS=":"
  for path in $PATH;
    do
    if [ -d "$path" ];
    then if [ -w "$path" ];
    	then echo $path;
			return 0;
		fi;
  	fi
  done;
	return 1;
}

BINDIR=`binDir || echo /usr/local/bin`
PROGRAM="src/ccbuild"
DEFCONF="./tools/ccResolutions.d"
CONFDIR="$HOME/.ccbuild"



echo
echo Install directory: $BINDIR
echo Config directory:  $CONFDIR
echo
echo "Do you want to continue with installation? (yes/no)"
read REPLY
if [[ "x$REPLY" != "xyes" ]];
  then
  echo Reply "\"$REPLY\"" isn\'t \"yes\"
  echo EXIT
  exit 1;
fi;

mkdir -p $CONFDIR

echo cp -r $DEFCONF $CONFDIR
cp -r $DEFCONF $CONFDIR

echo cp $PROGRAM $BINDIR
cp $PROGRAM $BINDIR