#! /bin/sh ### ### Make fake snapshots by doing nothing at all ### ### (c) 2011 Mark Wooding ### ###----- Licensing notice --------------------------------------------------- ### ### This file is part of the distorted.org.uk backup suite. ### ### distorted-backup is free software; you can redistribute it and/or modify ### it under the terms of the GNU General Public License as published by ### the Free Software Foundation; either version 2 of the License, or ### (at your option) any later version. ### ### distorted-backup is distributed in the hope that it will be useful, ### but WITHOUT ANY WARRANTY; without even the implied warranty of ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ### GNU General Public License for more details. ### ### You should have received a copy of the GNU General Public License along ### with distorted-backup; if not, write to the Free Software Foundation, ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. set -e quis=${0##*/} ###-------------------------------------------------------------------------- ### Parse the command line. ## Provide help or version information. usage="usage: $quis DEVICE [KEY=VALUE ...]" version="$quis, version 1.0.0" case "$#,$1" in 0,*) echo >&2 "$usage"; exit 1 ;; *,-v | *,--version) echo "$version"; exit ;; *,-h | *,--help) cat <&2 "$quis: malformed option \`$i'"; exit 1 ;; esac k=${i%%=*} v=${i#*=} case "$k" in *.trivial) k=${k%.trivial} ;; ?*.?*) continue ;; esac case "$k" in op | tag) eval "O$k=\$v" ;; *) echo >&2 "$quis: unknown option \`$k'"; win=nil ;; esac done case $win in nil) exit 1 ;; esac ###-------------------------------------------------------------------------- ### Take or remove the snapshot. case "$Oop" in snap) echo "$dev" ;; unsnap) ;; *) echo >&2 "$quis: unknown operation \`$Oop'" exit 1 ;; esac ###----- That's all, folks --------------------------------------------------