.emacs.d/snippets/sh-mode/sourced-check

9 lines
203 B
Bash

# -*- mode: Shell-script -*-
# name:sourced-check
# key:sourced
# --
if [ \$0 == $BASH_SOURCE ]; then
error "Do not run the script in a subshell via ./ Instead you should 'source' it!"
exit 1
fi