Skip to content

Instantly share code, notes, and snippets.

@jclosure
Created July 6, 2020 20:48
Show Gist options
  • Select an option

  • Save jclosure/d1d4cd9fcd38edaa1162f37a7dff31d3 to your computer and use it in GitHub Desktop.

Select an option

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
# 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