2011-08-08 00:06:24 +02:00
|
|
|
#!/bin/sh
|
2013-10-26 02:21:46 +02:00
|
|
|
# Usage: PREFIX=/usr/local ./install.sh
|
|
|
|
#
|
|
|
|
# Installs ruby-build under $PREFIX.
|
2011-08-08 00:06:24 +02:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2013-10-26 14:45:02 +02:00
|
|
|
cd "$(dirname "$0")"
|
2013-10-26 00:46:02 +02:00
|
|
|
|
2011-08-08 00:06:24 +02:00
|
|
|
if [ -z "${PREFIX}" ]; then
|
|
|
|
PREFIX="/usr/local"
|
|
|
|
fi
|
|
|
|
|
|
|
|
BIN_PATH="${PREFIX}/bin"
|
|
|
|
SHARE_PATH="${PREFIX}/share/ruby-build"
|
2023-11-07 18:13:12 +01:00
|
|
|
MAN_PATH="${PREFIX}/share/man/man1"
|
2011-08-08 00:06:24 +02:00
|
|
|
|
2023-11-07 18:13:12 +01:00
|
|
|
mkdir -p "$BIN_PATH" "$SHARE_PATH" "$MAN_PATH"
|
2011-08-08 00:06:24 +02:00
|
|
|
|
2013-10-26 02:21:46 +02:00
|
|
|
install -p bin/* "$BIN_PATH"
|
2013-12-29 14:14:17 +01:00
|
|
|
install -p -m 0644 share/ruby-build/* "$SHARE_PATH"
|
2023-11-07 18:13:12 +01:00
|
|
|
install -p -m 0644 share/man/man1/*.1 "$MAN_PATH"
|