Skip to content

Instantly share code, notes, and snippets.

View svalaskevicius's full-sized avatar

Sarunas Valaskevicius svalaskevicius

View GitHub Profile
#!/usr/bin/env bash
PACKAGE="$1"
VERSION="$(cat "$1.cabal" | grep -e '^version:[0-9 \.]*$' | sed -e 's/^version:\s*\([0-9\.]*\)\s*$/\1/')"
if test -z "$VERSION" ; then
echo "version not found."
exit 1
fi