forked from php-build/php-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·36 lines (24 loc) · 763 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
·36 lines (24 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
set -e
DIR=$(dirname "$0")
if [ -z "$PREFIX" ]; then
PREFIX="/usr/local"
fi
echo "Installing php-build in '$PREFIX'"
BIN_DIR="$PREFIX/bin"
SHARE_DIR="$PREFIX/share"
MAN_DIR="$PREFIX/share/man"
echo -n " - creating directories..."
[ ! -d "$BIN_DIR" ] && mkdir -p "$BIN_DIR"
[ ! -d "$MAN_DIR" ] && mkdir -p "$MAN_DIR"
[ ! -d "$SHARE_DIR" ] && mkdir -p "$SHARE_DIR"
[ ! -d "$MAN_DIR/man1" ] && mkdir -p "$MAN_DIR/man1"
[ ! -d "$MAN_DIR/man5" ] && mkdir -p "$MAN_DIR/man5"
echo " done."
echo -n " - copying files..."
cp -r "$DIR/bin/php"* "$PREFIX/bin"
cp -r "$DIR/share" "$PREFIX/"
cp "$DIR/man/php-build.1" "$MAN_DIR/man1/"
cp "$DIR/man/php-build.5" "$MAN_DIR/man5/"
echo " done."
echo "Done."