Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 56 lines (49 sloc) 1.364 kb
#!/bin/sh
: ${prefix:=/usr/local}
: ${includedir:=$prefix/include}
: ${libdir:=$prefix/lib}
: ${DESTDIR:=}
HEADER=BlocksRuntime/Block.h
LIB=libBlocksRuntime.a
docmd()
{
echo "$*"
if [ -z "$dryrun" ]; then eval "$*"; fi
}
if ! myid="$(id -u)"; then
echo "Cannot run id, aborting!"
exit 1
fi
if [ ! -r $HEADER ]; then
echo "Cannot find $HEADER, aborting!"
exit 1
fi
if [ ! -r $LIB ]; then
echo "Cannot find $LIB, did you run buildlib or buildlib-osx?"
exit 1
fi
dryrun=
if [ "$1" = '-n' ] || [ "$1" = '--dry-run' ]; then
dryrun=1
shift
fi
if [ "$#" != 0 ]; then
echo "Usage: [prefix=prefixdir] $0 [-n | --dry-run]"
exit 1
fi
if [ -n "$DESTDIR" ]; then
echo "Destination Root(\$DESTDIR): $DESTDIR (default is \"\")"
fi
echo "Install Prefix(\$prefix): $prefix (default is /usr/local)"
echo "Include Directory(\$includedir): $includedir (default is \$prefix/include)"
echo "Library Directory(\$libdir): $libdir (default is \$prefix/lib)"
echo "(use prefix=prefixdir $0 [or similar] to change)"
echo ''
if [ -z "$DESTDIR" -a -z "$dryrun" -a "$myid" != 0 ]; then
echo "Must be root to install, use sudo $0"
echo "(Or try using the --dry-run option)"
exit 1
fi
docmd "install -d "$DESTDIR"$includedir "$DESTDIR"$libdir"
docmd "install -m 644 $HEADER "$DESTDIR"$includedir/"
docmd "install -m 644 $LIB "$DESTDIR"$libdir/"
Jump to Line
Something went wrong with that request. Please try again.