hs-irc/make.sh

27 lines
486 B
Bash
Raw Normal View History

2020-07-21 19:12:39 -04:00
#!/bin/sh
usage() {
echo Usage: $0 '[run|build|clean]'
}
case $1 in
run)
$0 build >&2 || exit 1
echo '' >&2 && ./Main
;;
build)
if ! command -v tup >/dev/null; then
2020-07-21 19:16:31 -04:00
echo Error: You need tup installed to build: http://gittup.org/tup/ >&2
2020-07-21 19:12:39 -04:00
exit 1
fi
tup init 2>/dev/null
tup >&2
;;
clean)
rm -f Main *.o *.hi IRC/*.o IRC/*.hi
;;
*)
usage
;;
esac