File: localinstall.sh

package info (click to toggle)
ccbuild 2.0.7%2Bgit20160227.c1179286-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 1,692 kB
  • sloc: cpp: 5,211; ansic: 1,913; sh: 260; makefile: 26
file content (59 lines) | stat: -rwxr-xr-x 1,060 bytes parent folder | download | duplicates (4)
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
#!/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 "#"

make -j2 || exit 1;
strip -s 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