2012-10-23 02:23:48 -04:00
|
|
|
#!/bin/sh
|
2013-11-01 05:30:00 -04:00
|
|
|
# Usage: PREFIX=/usr/local ./install.sh
|
|
|
|
#
|
|
|
|
# Installs python-build under $PREFIX.
|
2012-10-23 02:23:48 -04:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2013-11-01 05:30:00 -04:00
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
2012-10-23 02:23:48 -04:00
|
|
|
if [ -z "${PREFIX}" ]; then
|
|
|
|
PREFIX="/usr/local"
|
|
|
|
fi
|
|
|
|
|
|
|
|
BIN_PATH="${PREFIX}/bin"
|
|
|
|
SHARE_PATH="${PREFIX}/share/python-build"
|
|
|
|
|
2013-11-01 05:30:00 -04:00
|
|
|
mkdir -p "$BIN_PATH" "$SHARE_PATH"
|
2012-10-23 02:23:48 -04:00
|
|
|
|
2013-11-01 05:30:00 -04:00
|
|
|
install -p bin/* "$BIN_PATH"
|
2014-02-08 21:20:59 -05:00
|
|
|
for share in share/python-build/*; do
|
|
|
|
if [ -d "$share" ]; then
|
|
|
|
cp -RPp "$share" "$SHARE_PATH"
|
|
|
|
else
|
|
|
|
install -p -m 0644 "$share" "$SHARE_PATH"
|
|
|
|
fi
|
|
|
|
done
|