Std.shlib: Difference between revisions
Jump to navigation
Jump to search
Line 18: | Line 18: | ||
f=$(dirname $0)/std.shib; [ -f ${f} ] && . ${f} || { echo "${f} not found" 1>&2; exit 1; } | f=$(dirname $0)/std.shib; [ -f ${f} ] && . ${f} || { echo "${f} not found" 1>&2; exit 1; } | ||
function main() { | |||
process-common-options $@ | |||
for i in ${args}; do | |||
# process remaining parameters as ${i} | |||
done | |||
} | |||
main $@ | |||
</pre> | </pre> |
Revision as of 09:26, 4 April 2016
Internal
Overview
Common bash functionality, such as fail and debug, and the logic to parse the corresponding command line switches.
GitHub
Integration
f=$(dirname $0)/std.shib; [ -f ${f} ] && . ${f} || { echo "${f} not found" 1>&2; exit 1; } function main() { process-common-options $@ for i in ${args}; do # process remaining parameters as ${i} done } main $@