std/c/README.md: Add section skeletons and don't indent lists
[sunny256-utils.git] / ga-set-type
blobc69b5ed15b8ca8b92c927ec059be90bbbc9cc83b
1 #!/bin/sh
3 #==============================================================================
4 # ga-set-type
5 # File ID: f703e6f4-cffd-11e6-87a5-f74d993421b0
7 # Set the current git-annex repository to one of the standard groups for
8 # preferred content.
10 # Author: Øyvind A. Holm <sunny@sunbase.org>
11 # License: GNU General Public License version 2 or later.
12 #==============================================================================
14 progname=ga-set-type
15 VERSION=0.1.1
17 opt_help=0
18 opt_quiet=0
19 opt_verbose=0
20 while test -n "$1"; do
21 case "$1" in
22 -h|--help) opt_help=1; shift ;;
23 -q|--quiet) opt_quiet=$(($opt_quiet + 1)); shift ;;
24 -v|--verbose) opt_verbose=$(($opt_verbose + 1)); shift ;;
25 --version) echo $progname $VERSION; exit 0 ;;
26 --) shift; break ;;
28 if printf '%s\n' "$1" | grep -q ^-; then
29 echo "$progname: $1: Unknown option" >&2
30 exit 1
31 else
32 break
34 break ;;
35 esac
36 done
37 opt_verbose=$(($opt_verbose - $opt_quiet))
39 if test "$opt_help" = "1"; then
40 test $opt_verbose -gt 0 && { echo; echo $progname $VERSION; }
41 cat <<END
43 Set the current git-annex repository to one of the standard groups for
44 preferred content, for example "backup", "transfer", "manual", etc.
47 Usage: $progname [options] GROUP
49 Options:
51 -h, --help
52 Show this help.
53 -q, --quiet
54 Be more quiet. Can be repeated to increase silence.
55 -v, --verbose
56 Increase level of verbosity. Can be repeated.
57 --version
58 Print version information.
60 END
61 exit 0
64 group="$1"
66 if test -z "$group"; then
67 echo $progname: No group specified >&2
68 exit 1
71 ga wanted . standard
72 ga group . $group
74 # vim: set ts=8 sw=8 sts=8 noet fo+=w tw=79 fenc=UTF-8 :