File: harness.sh

package info (click to toggle)
darcs 2.18.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,008 kB
  • sloc: haskell: 47,748; sh: 13,466; ansic: 447; perl: 134; makefile: 6
file content (27 lines) | stat: -rw-r--r-- 798 bytes parent folder | download | duplicates (7)
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
#!/usr/bin/env bash

. ./lib

# Print some stuff out for debugging if something goes wrong:
echo $HOME
echo $PATH
which darcs
command -v darcs

# Check things that should be true when all the testscripts run

test -f "$HOME/lib"
password="AKARABNADABARAK-KARABADANKBARAKA"
grep $password "$HOME/test" || grep $password "$HOME/harness.sh"

if echo $OS | grep -i windows; then
    if echo $OSTYPE | grep -i cygwin ; then
        real=$(cygpath -w $(command -v darcs.exe) | sed -e 's,\\,/,g' | tr -s '[:upper:]' '[:lower:]')
    else
        real=$(cmd //c echo $(command -v darcs.exe) | sed -e 's,\\,/,g' | tr -s '[:upper:]' '[:lower:]')
    fi
    wanted=$(echo "$DARCS" | sed -e 's,\\,/,g' | tr -s '[:upper:]' '[:lower:]')
    test "$real" = "$wanted"
else
    command -v darcs | fgrep "$DARCS"
fi