mirror of
https://github.com/Ascyii/scripts.git
synced 2026-01-01 04:44:24 -05:00
14 lines
395 B
Bash
Executable File
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
|