27 lines
338 B
Bash
27 lines
338 B
Bash
|
#! /bin/sh
|
||
|
set -e
|
||
|
|
||
|
if [ "$#" -ne 1 ]; then
|
||
|
echo "Parameter expected: <day>"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
|
||
|
if [ "$1" == "--help" ]; then
|
||
|
echo "Usage: $0 <dayxx>"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
if ! [ -d "$1" ]; then
|
||
|
echo "Not a directory: $1"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
cd "$1"
|
||
|
|
||
|
case "$1" in
|
||
|
# Default solutions -- Haskell
|
||
|
*) stack run <test.txt
|
||
|
;;
|
||
|
esac
|