env -S isn't a thing on linux of course. Go back to using standard env, which means using a stack options line, which means not using "ghc". This new setup is probably simpler anyway. I've just had to give up on the goal of having each script's required packages being defined in one place; now (to they extent they are required) they must be defined both in the script header and in compile.sh.
		
			
				
	
	
		
			14 lines
		
	
	
		
			333 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			333 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| # Compile all add-on scripts in this directory.
 | |
| 
 | |
| cd "$(dirname "$0")" || exit
 | |
| 
 | |
| echo "building hledger libraries for scripts"
 | |
| stack build hledger
 | |
| 
 | |
| echo "installing extra libraries for scripts"
 | |
| stack install string-qq
 | |
| 
 | |
| echo "compiling the hledger-* scripts"
 | |
| for f in `git ls-files 'hledger-*.hs'`; do stack ghc -- "$f"; done
 |