From c283a7d4327d7d18620ac97e927d88d5667781a4 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 26 Jul 2009 17:58:28 -0400 Subject: much refactoring. also, screw `bzr mv'. That's why I'm writing my own system. --- HACKING | 1 + Makefile.orig | 92 +++++++++++++++++------------- README | 1 + Variables | 5 -- configure | 107 +++++++++++++++++++---------------- src/core/init.sh | 29 ---------- src/core/plugins | 2 - src/core/plugins.d/repo/commit.d.sh | 23 -------- src/core/plugins.d/repo/commit.f.sh | 24 -------- src/core/plugins.d/repo/commit.sh | 51 ----------------- src/core/plugins.d/repo/get.d.sh | 30 ---------- src/core/plugins.d/repo/get.f.sh | 20 ------- src/core/plugins.d/repo/get.sh | 32 ----------- src/core/plugins.d/repo/lib/stdio.sh | 58 ------------------- src/core/plugins.d/users/mkuser.sh | 24 -------- src/core/plugins.d/users/rmuser.sh | 14 ----- src/core/repo.sh | 26 --------- src/rvs.sh | 64 --------------------- 18 files changed, 114 insertions(+), 489 deletions(-) delete mode 100644 Variables delete mode 100644 src/core/init.sh delete mode 100644 src/core/plugins delete mode 100644 src/core/plugins.d/repo/commit.d.sh delete mode 100644 src/core/plugins.d/repo/commit.f.sh delete mode 100644 src/core/plugins.d/repo/commit.sh delete mode 100644 src/core/plugins.d/repo/get.d.sh delete mode 100644 src/core/plugins.d/repo/get.f.sh delete mode 100644 src/core/plugins.d/repo/get.sh delete mode 100644 src/core/plugins.d/repo/lib/stdio.sh delete mode 100644 src/core/plugins.d/users/mkuser.sh delete mode 100644 src/core/plugins.d/users/rmuser.sh delete mode 100644 src/core/repo.sh delete mode 100644 src/rvs.sh diff --git a/HACKING b/HACKING index f7caf04..15c5beb 100644 --- a/HACKING +++ b/HACKING @@ -1,3 +1,4 @@ +#!/bin/more ////////////////////////////////////////////////////////////////////// rvs 0.6.3 retroactive versioning system diff --git a/Makefile.orig b/Makefile.orig index 975cb06..9b8473d 100644 --- a/Makefile.orig +++ b/Makefile.orig @@ -1,4 +1,4 @@ -# +#!/usr/bin/make -f # rvs Makefile # version 0.7.0 # Copyright (C) 2009 Luke Shumaker @@ -10,66 +10,80 @@ # Originally written by Luke Shumaker . -# Make Programs ##################################################### +# Variables ######################################################## RM = rm -f CP = cp -MKDIR = mkdir -p INSTALL = install -PRE = @@pre@@ # code pre-processor - -# Variables ######################################################## -SHELL = $$SHELL$$ -prefix = $$prefix$$ -bindir = $$bindir$$ -libdir = $$libdir$$ -sourcedir = @@sourcedir@@ - -# Targets ########################################################## - -rvs : wrapper core - -.PHONY : rvs install clean remove wrapper i-wrapper core i-core +MKDIR = $(INSTALL) -d #mkdir -p +INSTALL_PROGRAM = $(INSTALL) +INSTALL_DATA = $(INSTALL) -m 644 +TOUCH = touch +export RM CP INSTALL MKDIR INSTALL_PROGRAM INSTALL_DATA + +SHELL = @SHELL@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +sbindir = @sbindir@ +rvsdir = @rvsdir@/rvs +srcdir = @srcdir@ +export SHELL rvsdir srcdir + +plugins = $(shell find $(srcdir)/plugins/* -maxdepth 0 -type d) + +# phony targets #################################################### +make-plugins = $(addprefix make-,$(plugins)) +install-plugins = $(addprefix install-,$(plugins)) +remove-plugins = $(addprefix remove-,$(plugins)) +all-plugins = $(make-plugins) $(install-plugins) $(remove-plugins) +all : rvs $(make-plugins) +.PHONY : rvs install clean remove $(all-plugins) .SUFFIXES : -wrapper : out/rvs +# targets ########################################################## -core : shellScripts +rvs : out/rvs out/plugins/plugins -srcFiles = $(shell find $(sourcedir)/src/core/ -type f) -outFiles = $(patsubst $(sourcedir)/src/%,out/%,${basename $(srcFiles)}) -libFiles = $(patsubst out/core/%,$(libdir)/%, $(outFiles) ) -shellScripts : $(outFiles) - -# install - -install : rvs i-wrapper i-core - -i-wrapper : $(prefix)/$(bindir)/rvs +out/plugins/plugins : $(srcdir)/src/plugins/plugins $(PRE) + $(MKDIR) $(dir $@) + $(PRE) <$< > $@ +$(rvsdir)/plugins : + $(MKDIR) -d $(dir $@) + $(TOUCH) $@ -i-core : $(libFiles) +# install/clean/remove ############################################# -# clean/remove +install : $(prefix)/$(bindir)/rvs $(rvsdir)/plugins $(install-plugins) clean : - $(RM) -r tmp $(RM) -r out + $(RM) var.sed $(RM) Makefile remove : $(RM) $(prefix)/$(bindir)/rvs - $(RM) -r $(libdir) + $(RM) -r $(rvsdir) -# implicit rules +# implicit rules ################################################### -out/% : $(sourcedir)/src/%.sh $(PRE) +# 'build' shell scripts +out/% : $(srcdir)/%.sh $(MKDIR) $(dir $@) $(PRE) <$< > $@ +# install $(prefix)/$(bindir)/% : out/% - $(INSTALL) -m 755 -o root -g root -T $< $@ + $(MKDIR) $(dir $@) + $(INSTALL_PROGRAM) $< $@ + +# make plugins +make-% : $(srcdir)/plugins/% + $(MAKE) -C $($< -$(libdir)/% : out/core/% - $(INSTALL) -m 755 -o root -g root -d $(dir $@) - $(INSTALL) -m 755 -o root -g root -T $< $@ +# install plugins +install-% : make-% + $(MAKE) -C $< install + +#remove-% diff --git a/README b/README index d12d484..f839aae 100644 --- a/README +++ b/README @@ -1,3 +1,4 @@ +#!/bin/more ////////////////////////////////////////////////////////////////////// rvs 0.6.3 retroactive versioning system diff --git a/Variables b/Variables deleted file mode 100644 index c84887b..0000000 --- a/Variables +++ /dev/null @@ -1,5 +0,0 @@ -VER '0.7.0' -SHELL '/usr/bin/env bash' -prefix "$HOME" -bindir 'bin' -libdir '/etc/rvs' diff --git a/configure b/configure index 43adb5f..3cb0b29 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #!/bin/sh -# rvs configureation script +name='configure' # rvs configureation script # version 0.7.0 # Copyright (C) 2009 Luke Shumaker # This program is distributed in the hope that it will be useful, @@ -9,59 +9,70 @@ # # Originally written by Luke Shumaker . -sourcedir=`dirname "$0"` -pre='./var.sed' + _srcdir=$(readlink -f `dirname "$0"`) + _SHELL='/bin/sh' + _prefix='/usr/local' +_exec_prefix='$(prefix)' + _bindir='$(exec_prefix)/bin' + _sbindir='$(exec_prefix)/sbin' + rvsdir='/etc' -while [ $# -gt 0 ]; do case "$1" in - --*) - var0=`echo "$1" | sed -e 's/^--//' -e 's/=.*$//'` - match='false' - while read line; do - var1=`echo "$line" | cut -f 1 ` - if [ "$var0" == "$var1" ]; then - match='true' - break; +vars='srcdir SHELL prefix exec_prefix bindir sbindir rvsdir' + +error() { + echo "$name: $1" >> /dev/stderr + exit 1 +} + +args=`getopt -n "$name" -o "${sopt}" -l "${lopt}${vars}" -- "$@"` +if [ $? == 0 ]; then + set -- $args + while [ $# -gt 0 ]; do case "$1" in + --) break;; + --*) + var0="${1/--/}" + match='false' + for var1 in $vars; do + if [ "$var0" == "$var1" ]; then + match='true' + break; + fi + done + if [ "$match" == 'true' ]; then + val="$2" + eval _$var0=$val + else + error "option \`$1' not recognized"; fi - done < Variables - if [ "$match" == 'false' ]; then - echo "configure: option \`$1' not recognized" - exit 255; - else - val=`echo "$1" | sed -e "s/^--$var0=//"` - eval _$var0=$val - fi - :;; - *) echo "configure: option \`$1' not recognized"; exit 255;; + :;; + *) error "option \`$1' not recognized";; esac shift -done + done +else + error 'unable to parse command line arguments' +fi -echo '#!/bin/sed -f' > "$pre" -while read line; do - var=`echo "$line" | cut -f 1 ` - val=$(eval echo `echo "$line" | cut -f 2-`) # load from Variables file - val=$(eval echo '${'`echo _$var`-$val'}') # check for option overide +echo '#!/bin/sed -f' > var.sed +for var in $vars; do + var1="_$var" + val=${!var1} - # evaluate the values, so that we may use env variables as values - # escape slashes, as they cause problems for sed - var=`echo "$var" | sed 's:/:\\\\/:g'` - val=`echo "$val" | sed 's:/:\\\\/:g'` + var=${var//':'/'\:'} + val=${val//':'/'\:'} - echo 's/$$'"${var}"'$\$/'"${val}"'/' >> "$pre" - #sed -i.bak 's/$$'"${var}"'$\$/'"${val}"'/' "$files" - unset var val -done < "$sourcedir/Variables" + echo "s:@$var@:$val:g" >> var.sed +done -chmod +x "$pre" -"$pre" < "$sourcedir/Makefile.orig" > Makefile +echo "11 a# DO NOT edit this file, it has been generated by configure, and will +11 a# be overwritten. Instead, edit the file \`Makefile.orig'" >> var.sed + +Makefiles=`find "${_srcdir}/" -regextype posix-extended \ +-regex '(.*/)?Makefile\.orig' -type f` + +for orig in $Makefiles; do + new=${orig/%.orig/} + new=${new/#$_srcdir/} + sed -f var.sed < "${orig}" > "${new}" +done -n0='# DO NOT edit this file, it has been generated by configure, and will be' -n1='# overwritten. Instead, edit the file `Makefile.orig'\' -sourcedir=`echo "$sourcedir" | sed 's:/:\\\\/:g'` - pre=`echo "$pre" | sed 's:/:\\\\/:g'` -sed -i \ --e "11 a$n0" \ --e "11 a$n1" \ --e "s/@@sourcedir@@/$sourcedir/" \ --e "s/@@pre@@/$pre/" \ -Makefile diff --git a/src/core/init.sh b/src/core/init.sh deleted file mode 100644 index dc8a750..0000000 --- a/src/core/init.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!$$SHELL$$ -name='rvs init' -ver='0.7.0' -# Copyright (C) 2009 Luke Shumaker -# This program 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. -# -# Originally written by Luke Shumaker . - -repo=`rvs repo` -if [ "$old" = '' ]; then - repo='.rvs' - install -d "$repo" -fi - -if diff -q $RVSDIR/plugins $repo/plugins; then - install -T $RVSDIR/plugins $repo/plugins - while read plugin; do - if [ ! -e "$repo/$plugin" ]; then - install -d "$repo/$plugin" - if [ -e "$RVSDIR/$plugin/init" ]; then - $RVSDIR/$plugin/init - fi - fi - done < $repo/plugins -fi - diff --git a/src/core/plugins b/src/core/plugins deleted file mode 100644 index 18b388a..0000000 --- a/src/core/plugins +++ /dev/null @@ -1,2 +0,0 @@ -repo -users diff --git a/src/core/plugins.d/repo/commit.d.sh b/src/core/plugins.d/repo/commit.d.sh deleted file mode 100644 index 5b2d3fd..0000000 --- a/src/core/plugins.d/repo/commit.d.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!$$SHELL$$ -name='rvs commit.d' -ver='0.7.0' -# Copyright (C) 2009 Luke Shumaker -# This program 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. -# -# Originally written by Luke Shumaker . - -# commit.d DIRNAME -dir="$1" - -tmp=`tempfile` -for file in $dir/*; do - hash=`rvs commit "$file"` - echo "$file:$hash" >> "$tmp" -done - -rvs commit.f "$tmp" -rm "$tmp" - diff --git a/src/core/plugins.d/repo/commit.f.sh b/src/core/plugins.d/repo/commit.f.sh deleted file mode 100644 index 915ba3c..0000000 --- a/src/core/plugins.d/repo/commit.f.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!$$SHELL$$ -name='rvs commit.f' -ver='0.7.0' -# Copyright (C) 2009 Luke Shumaker -# This program 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. -# -# Originally written by Luke Shumaker . - -source "$RVSDIR/lib/stdio" -source "$RVSDIR/lib/rvsdb" - -# commit.f FILENAME -file="$1" - -#hash=`md5sum $file | sed "s/ .*$//"` -hash=`sha1sum $file | sed "s/ .*$//"` -if [ ! -f "`rvs repo`/files/$hash" ]; then - install -m 644 -o $USER -g $USER -T "$file" "`rvs repo`/files/$hash" -fi -echo "$hash" - diff --git a/src/core/plugins.d/repo/commit.sh b/src/core/plugins.d/repo/commit.sh deleted file mode 100644 index 0c8cfc5..0000000 --- a/src/core/plugins.d/repo/commit.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!$$SHELL$$ -name='rvs commit' -ver='0.7.0' -# Copyright (C) 2009 Luke Shumaker -# This program 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. -# -# Originally written by Luke Shumaker . - -source "$RVSDIR/lib/stdio" - -# commit FILE -if [ $# -gt 0 ]; then - file="$1" -else - file='.' -fi - -warn "$file" - -if [ ! -e $file ]; then error "file \`$file' does not exist"; -# START file type list -elif [ -L $file ]; then type='l'; # symbolic link -elif [ -b $file ]; then type='b'; # block (buffered) special -elif [ -c $file ]; then type='c'; # character (unbuffered) special -elif [ -d $file ]; then type='d'; # directory -elif [ -p $file ]; then type='p'; # named pipe (FIFO) -elif [ -f $file ]; then type='f'; # regular file -elif [ -s $file ]; then type='s'; # socket -#elif [ -D $file ]; type='D'; # door (Solaris only) -# END file type list -else error "could not identify file type of \`$file'" -fi - -ret=`rvs "commit.$type" "$file"` - -tmp=`tempfile` -cat << __EOF__ > "$tmp" -name:$file -hash:$ret -type:$type -author:$user -owner:$owner -license:$license -__EOF__ - -rvs commit.f "$tmp" -rm "$tmp" - diff --git a/src/core/plugins.d/repo/get.d.sh b/src/core/plugins.d/repo/get.d.sh deleted file mode 100644 index 2443850..0000000 --- a/src/core/plugins.d/repo/get.d.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!$$SHELL$$ -name='rvs get.d' -ver='0.7.0' -# Copyright (C) 2009 Luke Shumaker -# This program 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. -# -# Originally written by Luke Shumaker . - -#source "$RVSDIR/lib/stdio" -source "$RVSDIR/lib/rvsdb" - -# get.d ID DIRNAME -id="$1" -dir="$2" - -tmp=`tempfile` -rvs get.f `logread "$db" 'hash'` "$tmp" - -mkdir "$dir" -while read line; do - hash=`echo "$line" | sed 's/^.*://'` - name=`echo "$line" | sed "s/:$hash$//"` - rvs get "$dir/$file" -done < "$tmp" - -rm "$tmp" - diff --git a/src/core/plugins.d/repo/get.f.sh b/src/core/plugins.d/repo/get.f.sh deleted file mode 100644 index e631a1f..0000000 --- a/src/core/plugins.d/repo/get.f.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!$$SHELL$$ -name='rvs get.f' -ver='0.7.0' -# Copyright (C) 2009 Luke Shumaker -# This program 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. -# -# Originally written by Luke Shumaker . - -source "$RVSDIR/lib/stdio" -source "$RVSDIR/lib/rvsdb" - -# get.f ID FILENAME -id="$1" -file="$2" - -cp "`rvs repo`/files/$id" "$file" - diff --git a/src/core/plugins.d/repo/get.sh b/src/core/plugins.d/repo/get.sh deleted file mode 100644 index 4317c40..0000000 --- a/src/core/plugins.d/repo/get.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!$$SHELL$$ -name='rvs get' -ver='0.7.0' -# Copyright (C) 2009 Luke Shumaker -# This program 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. -# -# Originally written by Luke Shumaker . - -source "$RVSDIR/lib/stdio" -source "$RVSDIR/lib/rvsdb" - -# get ID [FILE] -id="$1" - -if [ $# -gt 1 ]; then - file="$2" -fi - -tmp=`tempfile` -rvs get.f "$id" "$tmp" -type=`logread "$tmp" 'type'` -if [ $# -gt 1 ]; then - file="$2" -else - file=`logread "$tmp" 'name'` -fi - -rvs "get.$type" "$id" "$file" - diff --git a/src/core/plugins.d/repo/lib/stdio.sh b/src/core/plugins.d/repo/lib/stdio.sh deleted file mode 100644 index e6ef31a..0000000 --- a/src/core/plugins.d/repo/lib/stdio.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!$$SHELL$$ -#name='rvs stdio' -#ver='0.7.0' -# Copyright (C) 2009 Luke Shumaker -# This program 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. -# -# Originally written by Luke Shumaker . - -verbose() { - if [ "$volume" == '-v' ]; then - echo $@ - fi -} - -out() { - if [ "$volume" != '-q' ]; then - echo $@ - fi -} - -warn () { - echo "$name: $1" >> /dev/stderr -} - -error() { - warn "$1" - cat << __error__ >> /dev/stderr -Usage: $name $usage - -Try \`$name --help\' for more options. -__error__ - exit 1 -} - -fatal () { - warn "$1" - exit 1 -} - -version() { - echo "$name $ver" - if [ "$volume" != '-q' ]; then - cat << __disclaimer__ -$name is copyright (C) 2009 Luke Shumaker -This program 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. - -Originally written by Luke Shumaker . -__disclaimer__ - fi - exit 0 -} - diff --git a/src/core/plugins.d/users/mkuser.sh b/src/core/plugins.d/users/mkuser.sh deleted file mode 100644 index 74c8a77..0000000 --- a/src/core/plugins.d/users/mkuser.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!$$SHELL$$ -name='rvs mkuser' -ver='0.7.0' -# Copyright (C) 2009 Luke Shumaker -# This program 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. -# -# Originally written by Luke Shumaker . - -read -p 'username: ' author -read -p 'give copyright to: ' owner -if [ "$owner" != 'Public Domain' ]; then - read -p 'use the license: ' license -else - license='' -fi -cat << __EOF__ > "`rvs repo`/users/$author" -author:$author -owner:$owner -license:$license -__EOF__ - diff --git a/src/core/plugins.d/users/rmuser.sh b/src/core/plugins.d/users/rmuser.sh deleted file mode 100644 index 82a71c5..0000000 --- a/src/core/plugins.d/users/rmuser.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!$$SHELL$$ -name='rvs rmuser' -ver='0.7.0' -# Copyright (C) 2009 Luke Shumaker -# This program 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. -# -# Originally written by Luke Shumaker . - -uname=$1 -rm "`rvs repo`/users/$uname" - diff --git a/src/core/repo.sh b/src/core/repo.sh deleted file mode 100644 index a94ccb8..0000000 --- a/src/core/repo.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!$$SHELL$$ -name='rvs repo' -ver='0.7.0' -# Copyright (C) 2009 Luke Shumaker -# This program 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. -# -# Originally written by Luke Shumaker . - -repo='.rvs' -pwd=`pwd` - -while [ "$pwd" != "`pwd`" ] && [ ! -e "`pwd`/$repo" ]; do - pwd=`pwd` - cd .. -done - -if [ -e "`pwd`/$repo" ]; then - echo "`pwd`/$repo" -else - echo "$name: no rvs repository found" >> /dev/stderr - exit 1 -fi - diff --git a/src/rvs.sh b/src/rvs.sh deleted file mode 100644 index f47659f..0000000 --- a/src/rvs.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!$$SHELL$$ -name='rvs' -ver='0.7.0' -# Copyright (C) 2009 Luke Shumaker -# This program 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. -# -# Originally written by Luke Shumaker . - -RVSDIR='$$libdir$$' -REPO=`$RVSDIR/repo` - -error() { - echo "$name: $1" >> /dev/stderr - exit 1 -} - -# START OPTION HANDLING # -com=$1; -# END OPTION HANDLING # -case "$com" in - '') error 'no command specified';; - *) - if [ -f "$RVSDIR/$com" ]; then - export RVSDIR - $RVSDIR/$@ - done='yes' - else - while read plugin; do - if [ -f "$RVSDIR/$plugin/$com" ]; then - export RVSDIR=$RVSDIR/$plugin - $RVSDIR/$@ - done='yes' - break - fi - done < $REPO/plugins - fi - if [ "$done" != 'yes' ]; then - error "unrecognized command \`$com'" - fi - :;; -esac - -#args=`getopt -n "$name" -o "${sopt}" -l "${lopt}" -- "$@"` -#if [ $? == 0 ]; then -# set -- $args -# while [ $# -gt 0 ]; do -# case "$1" in -# -V | --version) mode='version';; -# -h | -H | -\? | --help) mode='help';; -# -# -v | --verbose) volume='-v';; -# -q | --quiet) volume='-q';; -# -# --) shift; break;; -# esac -# shift; -# done -#else -# error -#fi - -- cgit v1.2.3