3 ### Make fake snapshots by doing nothing at all
5 ### (c) 2011 Mark Wooding
8 ###----- Licensing notice ---------------------------------------------------
10 ### This file is part of the distorted.org.uk backup suite.
12 ### distorted-backup is free software; you can redistribute it and/or modify
13 ### it under the terms of the GNU General Public License as published by
14 ### the Free Software Foundation; either version 2 of the License, or
15 ### (at your option) any later version.
17 ### distorted-backup is distributed in the hope that it will be useful,
18 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ### GNU General Public License for more details.
22 ### You should have received a copy of the GNU General Public License along
23 ### with distorted-backup; if not, write to the Free Software Foundation,
24 ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 ###--------------------------------------------------------------------------
30 ### Parse the command line.
32 ## Provide help or version information.
33 usage="usage: $quis DEVICE [KEY=VALUE ...]"
34 version="$quis, version 1.0.0"
36 0,*) echo >&2 "$usage"; exit 1 ;;
37 *,-v | *,--version) echo "$version"; exit ;;
44 op=OPERATION \`snap' to create snapshot, or \`unsnap' to remove.
45 tag=TAG Disambiguation tag to store in filesystem.
51 ## Scan the option keys.
58 *) echo >&2 "$quis: malformed option \`$i'"; exit 1 ;;
61 case "$k" in *.trivial) k=${k%.trivial} ;; ?*.?*) continue ;; esac
63 op | tag) eval "O$k=\$v" ;;
64 *) echo >&2 "$quis: unknown option \`$k'"; win=nil ;;
67 case $win in nil) exit 1 ;; esac
69 ###--------------------------------------------------------------------------
70 ### Take or remove the snapshot.
79 echo >&2 "$quis: unknown operation \`$Oop'"
84 ###----- That's all, folks --------------------------------------------------