File: common.bash

package info (click to toggle)
haskell-system-fileio 0.3.11-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 156 kB
  • ctags: 15
  • sloc: haskell: 1,285; ansic: 147; sh: 51; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 443 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
PATH="$PATH:$PWD/cabal-dev/bin/"

VERSION=$(awk '/^version:/{print $2}' system-fileio.cabal)

CABAL_DEV=$(which cabal-dev)
XZ=$(which xz)

require_cabal_dev()
{
	if [ -z "$CABAL_DEV" ]; then
		echo "Can't find 'cabal-dev' executable; make sure it exists on your "'$PATH'
		echo "Cowardly refusing to fuck with the global package database"
		exit 1
	fi
}

clean_dev_install()
{
	require_cabal_dev
	
	rm -rf dist
	$CABAL_DEV install || exit 1
}