Files
Ciro Santilli 036225b268 run: use getopt
2018-08-23 08:54:47 +01:00

18 lines
422 B
Bash
Executable File

#!/usr/bin/env bash
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
parsed=$(getopt -o "h${common_getopt_flags}" -l "$common_getopt_flags_long" -- "$@")
eval set -- "$parsed"
while true; do
case "$1" in
-h)
echo "https://github.com/cirosantilli/linux-kernel-module-cheat#getvar" 2>&1
exit
;;
*)
common_getopt_case "$@"
;;
esac
done
common_setup
eval "echo \$common_${1}"