3 : ${prefix:=/usr/local}
4 : ${includedir:=$prefix/include}
5 : ${libdir:=$prefix/lib}
7 HEADER
=BlocksRuntime
/Block.h
13 if [ -z "$dryrun" ]; then eval "$*"; fi
16 if ! myid
="$(id -u)"; then
17 echo "Cannot run id, aborting!"
20 if [ ! -r $HEADER ]; then
21 echo "Cannot find $HEADER, aborting!"
24 if [ ! -r $LIB ]; then
25 echo "Cannot find $LIB, did you run buildlib?"
29 if [ "$1" = '-n' ] ||
[ "$1" = '--dry-run' ]; then
33 if [ "$#" != 0 ]; then
34 echo "Usage: [prefix=prefixdir] $0 [-n | --dry-run]"
38 echo "Install Prefix(\$prefix): $prefix (default is /usr/local)"
39 echo "Include Directory(\$includedir): $includedir (default is \$prefix/include)"
40 echo "Library Directory(\$libdir): $libdir (default is \$prefix/lib)"
41 echo "(use prefix=prefixdir $0 [or similar] to change)"
44 if [ -z "$dryrun" -a "$myid" != 0 ]; then
45 echo "Must be root to install, use sudo $0"
46 echo "(Or try using the --dry-run option)"
49 docmd
"install -d $includedir $libdir"
50 docmd
"install -m 644 $HEADER $includedir/"
51 docmd
"install -m 644 $LIB $libdir/"