Browse Source

fixed shebangs on non-POSIX scripts

main
deicidus 2 years ago
parent
commit
050c586297
  1. 5
      spells/cantrips/await-keypress
  2. 2
      spells/cantrips/fathom-cursor
  3. 5
      spells/cantrips/move-cursor

5
spells/cantrips/await-keypress

@ -1,4 +1,4 @@
#!/usr/bin/env sh #!/usr/bin/env bash
# This magical spell captures and processes key presses. # This magical spell captures and processes key presses.
# Use it to capture key presses from the terminal and determine which key was pressed. # Use it to capture key presses from the terminal and determine which key was pressed.
@ -66,7 +66,4 @@ await_keypress() {
esac esac
} }
# Check if the script is being executed or sourced, if executed then call the function
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
await_keypress await_keypress
fi

2
spells/cantrips/fathom-cursor

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# This spell reveals the x and y coordinates of the cursor in the terminal window. # This spell reveals the x and y coordinates of the cursor in the terminal window.

5
spells/cantrips/move-cursor

@ -1,4 +1,4 @@
#!/usr/bin/env sh #!/usr/bin/env bash
# This magical spell moves the cursor to the specified x and y coordinates in the terminal window, as if guided by an unseen hand. # This magical spell moves the cursor to the specified x and y coordinates in the terminal window, as if guided by an unseen hand.
@ -23,7 +23,4 @@ test_move_cursor() {
echo "All tests passed" echo "All tests passed"
} }
# Check if the script is being sourced, and run it if not
if [ "${BASH_SOURCE[0]}" = "$0" ]; then
move_cursor "$@" move_cursor "$@"
fi

Loading…
Cancel
Save