Skip to content

Commit

Permalink
add shebangs to shell scripts and content to after.sh.erb (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom authored Nov 13, 2024
1 parent 00f4ab8 commit 3f08e00
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions template/after.sh.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# Wait for the Matlab server to start
echo "Waiting for Matlab server to open port ${port}..."
if wait_until_port_used "${host}:${port}" 600; then
echo "Discovered Matlab server listening on port ${port}!"
else
echo "Timed out waiting for Matlab server to open port ${port}!"
clean_up 1
fi
sleep 2

2 changes: 2 additions & 0 deletions template/before.sh.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

[[ $(type -t module) == "function" ]] && export -f module

port=$(find_port ${host})
Expand Down
1 change: 1 addition & 0 deletions template/script.sh.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash

module purge
module restore
Expand Down

0 comments on commit 3f08e00

Please sign in to comment.