Browse Source

started removing sourced check across all files

main
deicidus 2 years ago
parent
commit
24fe80cbbc
  1. 3
      spells/cantrips/cursor-blink
  2. 4
      spells/cantrips/fathom-cursor
  3. 4
      spells/cantrips/fathom-terminal
  4. 2
      spells/read-magic

3
spells/cantrips/cursor-blink

@ -14,8 +14,6 @@ cursor_blink_off() {
printf "\033[?25l"
}
# Check if the script is being called from another script
if [ "${BASH_SOURCE[0]}" = "$0" ]; then
# If not, call the appropriate function based on the command line argument
if [ "$1" = "on" ]; then
cursor_blink_on
@ -24,4 +22,3 @@ if [ "${BASH_SOURCE[0]}" = "$0" ]; then
else
echo "Usage: cast_cursor_blink on|off"
fi
fi

4
spells/cantrips/fathom-cursor

@ -57,8 +57,4 @@ test_fathom_cursor() {
assert_equal "$(./fathom-cursor)" "$(./fathom-cursor -x -y)" "fathom_cursor and -x -y outputs differ"
}
# Check if the script is being called from another script
if [ "${BASH_SOURCE[0]}" = "$0" ]; then
# If not, call the function
fathom_cursor "$@"
fi

4
spells/cantrips/fathom-terminal

@ -63,8 +63,4 @@ test_fathom_terminal() {
assert_output "fathom_terminal --height --verbose --width" "Height: $(tput lines)\nWidth: $(tput cols)"
}
# Check if the script is being called from another script
if [ "${BASH_SOURCE[0]}" = "$0" ]; then
# If not, call the function
fathom_terminal "$@"
fi

2
spells/read-magic

@ -15,7 +15,7 @@ file=$1
attribute=$2
# Check that the file exists
if [ ! -f "$file" ]; then
if [ ! -f "$file" ] && [ ! -d "$file" ]; then
echo "Error: The file does not exist."
exit 1
fi

Loading…
Cancel
Save