mirror of
https://github.com/Ascyii/scripts.git
synced 2026-01-01 04:44:24 -05:00
Init
This commit is contained in:
13
shell/ghci_wrapper.sh
Executable file
13
shell/ghci_wrapper.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user