-
-
Save rcmdnk/b7c17c42d108cc1860a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Execution part {{{ | |
_s_is_exec=1 | |
_sf_check_args_first () { # {{{ | |
while [ $# -gt 0 ];do | |
case $1 in | |
"-h"|"-N"|"-m"|"-p"|"-F"|"-v" ) _s_is_exec=2;shift;; | |
"-n" ) _s_is_exec=0;shift;; | |
"-c" ) _SENTAKU_CHILD=1;shift;; | |
* )break;; | |
esac | |
done | |
} # }}} | |
_sf_check_args_first "$@" | |
# Execute if stdin is available, or any of help/file/push is on | |
if [ $_s_is_exec -ne 0 ];then | |
if [ -p /dev/stdin ] || [ $_s_is_exec -eq 2 ];then | |
_sf_main "$@" | |
fi | |
fi | |
# Clean up | |
unset _s_is_exec | |
# }}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment