Files
scripts/shell/ghci_wrapper.sh
2025-09-18 11:35:56 +02:00

14 lines
395 B
Bash
Executable File

#!/bin/bash
# Set the directory path
dir_path="app/"
# Check if the directory exists and contains at least one .hs file
if [ -d "$dir_path" ] && [ "$(ls -A $dir_path/*.hs 2>/dev/null)" ]; then
# If the directory exists and contains .hs files, execute ghci with them
ghci "$dir_path"*.hs
else
# If the directory doesn't exist or doesn't contain .hs files, execute ghci without them
ghci
fi