Created
July 6, 2020 20:48
-
-
Save jclosure/d1d4cd9fcd38edaa1162f37a7dff31d3 to your computer and use it in GitHub Desktop.
TODO: build a key=value parameter processing library similar to python's for shell scripts
This file contains hidden or 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
| # base on this args processing model | |
| for a in "$@"; do | |
| case $a in | |
| --path | -P) | |
| shift 1 | |
| EMACS="$1" | |
| shift 1 | |
| ;; | |
| --toolbars | -B) | |
| shift 1 | |
| TOOLBARS=1 | |
| ;; | |
| --load-packages) | |
| shift 1 | |
| LOAD_PACKAGES="$1" | |
| shift 1 | |
| ;; | |
| -h) | |
| usage | |
| exit 1 | |
| ;; | |
| esac | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment