summaryrefslogtreecommitdiffstats
path: root/skeletons/sh.erb
blob: e2c953e6b9f99eeb40c403b18a7f9c40eb189a56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<%= header 'sh.hdr' %>

SELF=`basename $0`
VERSION='0.0.1'

function usage ( ) {
    echo "usage : $SELF  [-]"
}

function version ( ) {
    echo " $SELF version $VERSION"
    echo " Copyright (C) <%= @username %> <%= "#{Time.now.year}-#{Time.now.year+3}" %>"
    echo " This is free software; There is NO warranty; "
    echo " not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
}

OPTERR=1
while [ 1 ]; do
    getopts "vha:" OPT
    if test $? -gt 0; then break; fi
    case $OPT in
        v)
        version && exit 0
        ;;
        h)
        usage && exit 0
        ;;
        a)
        echo "arg $OPTARG [$OPTIND]"
        ;;
    esac
done