mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-01-01 14:44:48 +01:00
60e575ae67
* Shorter. * Preserve timestamps and permissions. * Overwrite existing files.
20 lines
341 B
Bash
Executable file
20 lines
341 B
Bash
Executable file
#!/bin/sh
|
|
# Usage: PREFIX=/usr/local ./install.sh
|
|
#
|
|
# Installs ruby-build under $PREFIX.
|
|
|
|
set -e
|
|
|
|
cd "${0%/*}"
|
|
|
|
if [ -z "${PREFIX}" ]; then
|
|
PREFIX="/usr/local"
|
|
fi
|
|
|
|
BIN_PATH="${PREFIX}/bin"
|
|
SHARE_PATH="${PREFIX}/share/ruby-build"
|
|
|
|
mkdir -p "$BIN_PATH" "$SHARE_PATH"
|
|
|
|
install -p bin/* "$BIN_PATH"
|
|
install -p share/ruby-build/* "$SHARE_PATH"
|