nutools/lib/script.template

20 lines
377 B
Plaintext
Raw Normal View History

2013-08-27 15:14:44 +04:00
#!/bin/bash
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
function display_help() {
uecho "$scriptname:
USAGE
$scriptname [options]
OPTIONS"
}
2013-10-31 00:07:15 +04:00
source "$(dirname "$0")/ulib/ulib" &&
urequire DEFAULTS ||
exit 1
2013-08-27 15:14:44 +04:00
parse_opts "${PRETTYOPTS[@]}" \
--help '$exit_with display_help' \
@ args -- "$@" && set -- "${args[@]}" || die "$args"