Skip to content

Commit 3306e91

Browse files
Merge pull request #65 from blmaier/add-distro-packaging-installer
add distro packaging installer
2 parents c0e3a26 + 84d1693 commit 3306e91

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

install.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
BATS_ROOT="${0%/*}"
6+
PREFIX="${1%/}"
7+
LIBDIR="${2:-lib}"
8+
9+
if [[ -z "$PREFIX" ]]; then
10+
printf '%s\n' \
11+
"usage: $0 <prefix> [base_libdir]" \
12+
" e.g. $0 /usr/local" \
13+
" $0 /usr/local lib64" >&2
14+
exit 1
15+
fi
16+
17+
BATS_LIBDIR=$PREFIX/$LIBDIR/bats/bats-file
18+
19+
install -d -m 755 "$BATS_LIBDIR/src"
20+
install -m 755 "$BATS_ROOT/load.bash" "$BATS_LIBDIR"
21+
install -m 755 "$BATS_ROOT/src/"* "$BATS_LIBDIR/src"
22+
23+
echo "Installed Bats File to $BATS_LIBDIR"

0 commit comments

Comments
 (0)