From 6a047515e09239fdd48857fdba4bc6af9b8a5840 Mon Sep 17 00:00:00 2001 From: Sam Zaydel Date: Fri, 24 Nov 2017 07:34:02 -0800 Subject: [PATCH] install.sh should make files executable before copy --- install.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 8bbdd16..0470498 100755 --- a/install.sh +++ b/install.sh @@ -28,10 +28,11 @@ if [ -z "$1" ]; then fi BATS_ROOT="$(abs_dirname "$0")" -mkdir -p "$PREFIX"/{bin,libexec,share/man/man{1,7}} -cp -R "$BATS_ROOT"/bin/* "$PREFIX"/bin -cp -R "$BATS_ROOT"/libexec/* "$PREFIX"/libexec -cp "$BATS_ROOT"/man/bats.1 "$PREFIX"/share/man/man1 -cp "$BATS_ROOT"/man/bats.7 "$PREFIX"/share/man/man7 +mkdir -p "${PREFIX%/}"/{bin,libexec,share/man/man{1,7}} +chmod +x "$BATS_ROOT"/bin/* "$BATS_ROOT"/libexec/* +cp -R "$BATS_ROOT"/bin/* "${PREFIX%/}"/bin +cp -R "$BATS_ROOT"/libexec/* "${PREFIX%/}"/libexec +cp "$BATS_ROOT"/man/bats.1 "${PREFIX%/}"/share/man/man1 +cp "$BATS_ROOT"/man/bats.7 "${PREFIX%/}"/share/man/man7 -echo "Installed Bats to $PREFIX/bin/bats" +echo "Installed Bats to ${PREFIX%/}/bin/bats"