File: run_rspec.sh

package info (click to toggle)
sugarjar 2.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 548 kB
  • sloc: ruby: 2,035; sh: 94; makefile: 8
file content (17 lines) | stat: -rwxr-xr-x 321 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

SCRIPTS=$(dirname "$(realpath "$0")")
REPODIR="$SCRIPTS/.."

BIN='bundle exec rspec'
CMD="$BIN --format d"

if [ -n "$1" ]; then
    args=( "$@" )
else
    cd "$REPODIR" || { echo "Failed to cd to repo root"; exit 1; }
    args=()
fi
# shellcheck disable=SC2086
echo $CMD "${args[@]}"
exec $CMD "${args[@]}"