From 6cd61746524c1240d8e181e6e3dda70653cea5b2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 30 Mar 2010 22:03:04 -0600 Subject: whoop, should have proably commited a momemnt ago --- Makefile | 2 +- README | 2 +- rvs/config | 2 +- rvs/plugins/filecontent/bin/commit.d.sh | 34 +++++++++++++++++ rvs/plugins/filecontent/bin/commit.f.sh | 32 ++++++++++++++++ rvs/plugins/filecontent/bin/commit.sh | 27 ++++++++++++++ rvs/plugins/filecontent/bin/get.d.sh | 45 ++++++++++++++++++++++ rvs/plugins/filecontent/bin/get.f.sh | 27 ++++++++++++++ rvs/plugins/filecontent/bin/gettype.sh | 39 +++++++++++++++++++ rvs/plugins/filecontent/bin/init.sh | 21 +++++++++++ rvs/plugins/filecontent/etc/3-d.sh | 3 ++ rvs/plugins/filecontent/etc/5-f.sh | 3 ++ rvs/plugins/filecontent/info.mk.in | 3 ++ rvs/plugins/filecontent/lib/stdio.sh | 66 +++++++++++++++++++++++++++++++++ rvs/plugins/filedata/bin/commit.sh | 33 ----------------- rvs/plugins/filedata/bin/get.sh | 23 ------------ rvs/plugins/filedata/info.mk.in | 3 -- rvs/plugins/filename/bin/commit.sh | 36 ++++++++++++++++++ rvs/plugins/filename/bin/get.sh | 32 ++++++++++++++++ rvs/plugins/filename/bin/init.sh | 21 +++++++++++ rvs/plugins/filename/info.mk.in | 3 ++ rvs/plugins/files/bin/commit.d.sh | 35 ----------------- rvs/plugins/files/bin/commit.f.sh | 32 ---------------- rvs/plugins/files/bin/commit.sh | 36 ------------------ rvs/plugins/files/bin/get.d.sh | 45 ---------------------- rvs/plugins/files/bin/get.f.sh | 27 -------------- rvs/plugins/files/bin/get.sh | 34 ----------------- rvs/plugins/files/etc/3-d.sh | 20 ---------- rvs/plugins/files/etc/5-f.sh | 20 ---------- rvs/plugins/files/info.mk.in | 3 -- rvs/plugins/files/lib/stdio.sh | 66 --------------------------------- rvs/plugins/plugin.mk.in | 3 +- rvs/plugins/users/bin/commit.sh | 29 --------------- rvs/plugins/users/bin/init.sh | 28 -------------- rvs/plugins/users/bin/login.sh | 28 -------------- rvs/plugins/users/bin/logout.sh | 27 -------------- rvs/plugins/users/bin/mkuser.sh | 29 --------------- rvs/plugins/users/bin/rmuser.sh | 28 -------------- rvs/plugins/users/info.mk.in | 3 -- rvs/plugins/users/lib/stdio.sh | 66 --------------------------------- rvs/wrapper/rvs.sh | 39 ++++++++++++------- 41 files changed, 421 insertions(+), 634 deletions(-) create mode 100644 rvs/plugins/filecontent/bin/commit.d.sh create mode 100644 rvs/plugins/filecontent/bin/commit.f.sh create mode 100644 rvs/plugins/filecontent/bin/commit.sh create mode 100644 rvs/plugins/filecontent/bin/get.d.sh create mode 100644 rvs/plugins/filecontent/bin/get.f.sh create mode 100644 rvs/plugins/filecontent/bin/gettype.sh create mode 100644 rvs/plugins/filecontent/bin/init.sh create mode 100644 rvs/plugins/filecontent/etc/3-d.sh create mode 100644 rvs/plugins/filecontent/etc/5-f.sh create mode 100644 rvs/plugins/filecontent/info.mk.in create mode 100644 rvs/plugins/filecontent/lib/stdio.sh delete mode 100644 rvs/plugins/filedata/bin/commit.sh delete mode 100644 rvs/plugins/filedata/bin/get.sh delete mode 100644 rvs/plugins/filedata/info.mk.in create mode 100644 rvs/plugins/filename/bin/commit.sh create mode 100644 rvs/plugins/filename/bin/get.sh create mode 100644 rvs/plugins/filename/bin/init.sh create mode 100644 rvs/plugins/filename/info.mk.in delete mode 100644 rvs/plugins/files/bin/commit.d.sh delete mode 100644 rvs/plugins/files/bin/commit.f.sh delete mode 100644 rvs/plugins/files/bin/commit.sh delete mode 100644 rvs/plugins/files/bin/get.d.sh delete mode 100644 rvs/plugins/files/bin/get.f.sh delete mode 100644 rvs/plugins/files/bin/get.sh delete mode 100644 rvs/plugins/files/etc/3-d.sh delete mode 100644 rvs/plugins/files/etc/5-f.sh delete mode 100644 rvs/plugins/files/info.mk.in delete mode 100644 rvs/plugins/files/lib/stdio.sh delete mode 100644 rvs/plugins/users/bin/commit.sh delete mode 100644 rvs/plugins/users/bin/init.sh delete mode 100644 rvs/plugins/users/bin/login.sh delete mode 100644 rvs/plugins/users/bin/logout.sh delete mode 100644 rvs/plugins/users/bin/mkuser.sh delete mode 100644 rvs/plugins/users/bin/rmuser.sh delete mode 100644 rvs/plugins/users/info.mk.in delete mode 100644 rvs/plugins/users/lib/stdio.sh diff --git a/Makefile b/Makefile index 4420419..8483002 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ distclean-% : % %/ $(RM) -r $<-build/ $(RM) $. + +. "$LIBDIR/@ID@/stdio" + +# commit.d DIRNAME +dir="${1?'usage: commit.d DIRNAME'}" +tmp=`mktemp` + +cd "$dir" +for file in *; do + id=`"$RVS" commit "$file"` + echo "$file:$id" >> "$tmp" +done + +"$RVS" commit.f "$tmp" d +rm "$tmp" + diff --git a/rvs/plugins/filecontent/bin/commit.f.sh b/rvs/plugins/filecontent/bin/commit.f.sh new file mode 100644 index 0000000..726a7e3 --- /dev/null +++ b/rvs/plugins/filecontent/bin/commit.f.sh @@ -0,0 +1,32 @@ +#!/bin/sh +name='rvs files commit.f' +ver=0.9 +# Copyright (C) 2009 Luke Shumaker +# +# This program 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. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. +# If not, see . + +#. "$LIBDIR/@ID@/stdio" + +# commit.f FILENAME +usage="usage: $RVS commit.f FILENAME [PREFIX]" +file="${1?"$usage"}" +prefix="${2-f}" + +hash=`sha1sum $file | sed "s/ .*$//"` +if [ ! -f "$REPO/@ID@/$hash" ]; then + install -m 644 -o $USER -g $USER -T "$file" "$REPO/@ID@/$prefix/$hash" +fi +echo "$prefix/$hash" + diff --git a/rvs/plugins/filecontent/bin/commit.sh b/rvs/plugins/filecontent/bin/commit.sh new file mode 100644 index 0000000..e8db1eb --- /dev/null +++ b/rvs/plugins/filecontent/bin/commit.sh @@ -0,0 +1,27 @@ +#!/bin/sh +name='rvs filecontent commit' +ver=0.9 +# Copyright (C) 2009-2010 Luke Shumaker +# +# This program 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. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. +# If not, see . + +. "$LIBDIR/@ID@/stdio" + +# commit FILE +file=${1-.} # take arg1 as the file, default to the current directory + +type=`"$RVS" gettype "$file"` +"$RVS" "commit.$type" "$file" + diff --git a/rvs/plugins/filecontent/bin/get.d.sh b/rvs/plugins/filecontent/bin/get.d.sh new file mode 100644 index 0000000..1723d8a --- /dev/null +++ b/rvs/plugins/filecontent/bin/get.d.sh @@ -0,0 +1,45 @@ +#!/bin/sh +name='rvs files get.d' +ver=0.9 +# Copyright (C) 2009 Luke Shumaker +# +# This program 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. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. +# If not, see . + +#. "$LIBDIR/@ID@/stdio" + +# get.d ID DIRNAME +id="$1" +dir="$2" + +tmp=`mktemp` +"$RVS" get.f "$id" "$tmp" + +#install -d "$dir" +mkdir -p "$dir" + +cd "$dir" +rm -rf ./* +while read line; do + # GNU bash optimized version + #hash=${line/#*:/} + #name=${line/%:${hash}/} + # POSIX version + hash=`echo "$line" | sed 's/^.*://'` + name=`echo "$line" | sed "s/:$hash$//"` + "$RVS" get "$hash" "$name" +done < "$tmp" + +rm "$tmp" + diff --git a/rvs/plugins/filecontent/bin/get.f.sh b/rvs/plugins/filecontent/bin/get.f.sh new file mode 100644 index 0000000..c706931 --- /dev/null +++ b/rvs/plugins/filecontent/bin/get.f.sh @@ -0,0 +1,27 @@ +#!/bin/sh +name='rvs files get.f' +ver=0.9 +# Copyright (C) 2009 Luke Shumaker +# +# This program 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. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. +# If not, see . + +#. "$LIBDIR/@ID@/stdio" + +# get.f ID FILENAME +id="$1" +file="$2" + +install -T "$REPO/@ID@/$id" "$file" + diff --git a/rvs/plugins/filecontent/bin/gettype.sh b/rvs/plugins/filecontent/bin/gettype.sh new file mode 100644 index 0000000..4592ee7 --- /dev/null +++ b/rvs/plugins/filecontent/bin/gettype.sh @@ -0,0 +1,39 @@ +#!/bin/sh +name='rvs filecontent gettype' +ver=0.9 +# Copyright (C) 2009-2010 Luke Shumaker +# +# This program 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. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. +# If not, see . + +. "$LIBDIR/@ID@/stdio" + +usage="usage: $RVS gettype FILE" +file=${1?"$usage"} + +if [ ! -e "$file" ]; then + error "file \`$file' does not exist"; +else + type='' + for check in "$ETCDIR/@ID@/"*; do + type=`"$check" "$file"` + if [ -n "$type" ]; then break; fi + done + if [ -z "$type" ]; then + echo "$type" + else + error "cannot handle file type of \`$file'" + fi +fi + diff --git a/rvs/plugins/filecontent/bin/init.sh b/rvs/plugins/filecontent/bin/init.sh new file mode 100644 index 0000000..71a2aa8 --- /dev/null +++ b/rvs/plugins/filecontent/bin/init.sh @@ -0,0 +1,21 @@ +#!/bin/sh +name='rvs generic init' +ver=0.9 +# Copyright (C) 2009 Luke Shumaker +# +# This program 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. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. +# If not, see . + +mkdir -p "$REPO/@ID@" + diff --git a/rvs/plugins/filecontent/etc/3-d.sh b/rvs/plugins/filecontent/etc/3-d.sh new file mode 100644 index 0000000..f169cae --- /dev/null +++ b/rvs/plugins/filecontent/etc/3-d.sh @@ -0,0 +1,3 @@ +#!/bin/sh +if [ -d "$1" ]; then echo 'd'; fi + diff --git a/rvs/plugins/filecontent/etc/5-f.sh b/rvs/plugins/filecontent/etc/5-f.sh new file mode 100644 index 0000000..0506894 --- /dev/null +++ b/rvs/plugins/filecontent/etc/5-f.sh @@ -0,0 +1,3 @@ +#!/bin/sh +if [ -f "$1" ]; then echo 'f'; fi + diff --git a/rvs/plugins/filecontent/info.mk.in b/rvs/plugins/filecontent/info.mk.in new file mode 100644 index 0000000..eb388c7 --- /dev/null +++ b/rvs/plugins/filecontent/info.mk.in @@ -0,0 +1,3 @@ +name = filecontent +ver = 0.9 +priority = 0 diff --git a/rvs/plugins/filecontent/lib/stdio.sh b/rvs/plugins/filecontent/lib/stdio.sh new file mode 100644 index 0000000..ca4a86a --- /dev/null +++ b/rvs/plugins/filecontent/lib/stdio.sh @@ -0,0 +1,66 @@ +#!/bin/sh +#name='rvs files stdio' +#ver=0.9 +# Copyright (C) 2009 Luke Shumaker +# +# This program 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. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. +# If not, see . + +verbose() { + if [ "$volume" == '-v' ]; then + echo $@ >> /dev/stderr + fi +} + +out() { + if [ "$volume" != '-q' ]; then + echo $@ >> /dev/stderr + fi +} + +warn () { + echo "$name: $1" >> /dev/stderr +} + +fatal () { + warn "$1" + exit 1 +} + +error() { + warn "$1" + cat << __error__ >> /dev/stderr +Usage: $name $usage + +Try \`$name --help' for more options. +__error__ + 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/rvs/plugins/filedata/bin/commit.sh b/rvs/plugins/filedata/bin/commit.sh deleted file mode 100644 index 9b7f59a..0000000 --- a/rvs/plugins/filedata/bin/commit.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -name='rvs filedata commit' -ver=0.9 -# Copyright (C) 2009 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -out="$1" -file="$2" -hash="`cat /dev/stdin`" - -temp=`mktemp` -echo "Hash: $hash" > "$temp" -stat "$file" >> "$temp" - -meta=`sha1sum "$temp" | sed "s/ .*$//"` -if [ ! -f "$REPO/@ID@/$hash" ]; then - install -m 644 -o $USER -g $USER -T "$temp" "$REPO/@ID@/$meta" -fi -echo "$meta" - diff --git a/rvs/plugins/filedata/bin/get.sh b/rvs/plugins/filedata/bin/get.sh deleted file mode 100644 index 321d5f8..0000000 --- a/rvs/plugins/filedata/bin/get.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -name='rvs filedata get' -ver=0.9 -# Copyright (C) 2009 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -out="$1" - -echo "yeah, this hasn't been coded yet, sorry!" - diff --git a/rvs/plugins/filedata/info.mk.in b/rvs/plugins/filedata/info.mk.in deleted file mode 100644 index 0746843..0000000 --- a/rvs/plugins/filedata/info.mk.in +++ /dev/null @@ -1,3 +0,0 @@ -name = filedata -ver = 0.9 -priority = 1 diff --git a/rvs/plugins/filename/bin/commit.sh b/rvs/plugins/filename/bin/commit.sh new file mode 100644 index 0000000..f4fd0f0 --- /dev/null +++ b/rvs/plugins/filename/bin/commit.sh @@ -0,0 +1,36 @@ +#!/bin/sh +name='rvs filename commit' +ver=0.9 +# Copyright (C) 2009 Luke Shumaker +# +# This program 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. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. +# If not, see . + +file="${1-.}" +string="`cat "$TMPDIR/commit/filecontent"`" +type=`echo $string | sed 's/:.*$//'` +hash=`echo $string | sed 's/^.://'` + +temp=`mktemp` +echo "#rvs-filename-0.9" > "$temp" +echo "name:$file" >> "$temp" +echo "type:$type" >> "$temp" +echo "hash:$hash" >> "$temp" + +meta=`sha1sum "$temp" | sed "s/ .*$//"` +if [ ! -f "$REPO/@ID@/$hash" ]; then + install -m 644 -o $USER -g $USER -T "$temp" "$REPO/@ID@/$meta" +fi +echo "$meta" + diff --git a/rvs/plugins/filename/bin/get.sh b/rvs/plugins/filename/bin/get.sh new file mode 100644 index 0000000..bc08063 --- /dev/null +++ b/rvs/plugins/filename/bin/get.sh @@ -0,0 +1,32 @@ +#!/bin/sh +name='rvs files get' +ver=0.9 +# Copyright (C) 2009 Luke Shumaker +# +# This program 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. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. +# If not, see . + +# get ID +usage="usage: $RVS get ID [FILENAME]" +id="${1?"$usage"}" + +file="$REPO/@ID@/$id" + + type="`sed -n 's/^type://p' "$file"`" +name="${2-`sed -n 's/^name://p' "$file"`}" + hash="`sed -n 's/^hash://p' "$file"`" + +"$RVS" get.$type "$hash" "$name" +rm "$tmp" + diff --git a/rvs/plugins/filename/bin/init.sh b/rvs/plugins/filename/bin/init.sh new file mode 100644 index 0000000..71a2aa8 --- /dev/null +++ b/rvs/plugins/filename/bin/init.sh @@ -0,0 +1,21 @@ +#!/bin/sh +name='rvs generic init' +ver=0.9 +# Copyright (C) 2009 Luke Shumaker +# +# This program 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. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. +# If not, see . + +mkdir -p "$REPO/@ID@" + diff --git a/rvs/plugins/filename/info.mk.in b/rvs/plugins/filename/info.mk.in new file mode 100644 index 0000000..3cd3a0d --- /dev/null +++ b/rvs/plugins/filename/info.mk.in @@ -0,0 +1,3 @@ +name = filename +ver = 0.9 +priority = 1 diff --git a/rvs/plugins/files/bin/commit.d.sh b/rvs/plugins/files/bin/commit.d.sh deleted file mode 100644 index f5b432b..0000000 --- a/rvs/plugins/files/bin/commit.d.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -name='rvs files commit.d' -ver=0.9 -# Copyright (C) 2009 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -source "$libexecdir/@ID@/stdio" - -# commit.d DIRNAME -out="$1" -dir="$2" -tmp=`mktemp` - -cd "$dir" -for file in *; do - hash=`"$RVS" commit "$file"` - echo "$file:$hash" >> "$tmp" -done - -"$RVS" commit.f "$out" "$tmp" -rm "$tmp" - diff --git a/rvs/plugins/files/bin/commit.f.sh b/rvs/plugins/files/bin/commit.f.sh deleted file mode 100644 index a86e5b5..0000000 --- a/rvs/plugins/files/bin/commit.f.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -name='rvs files commit.f' -ver=0.9 -# Copyright (C) 2009 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -#source "$libexecdir/@ID@/stdio" - -# commit.f FILENAME -out="$1" -file="$2" - -#hash=`md5sum $file | sed "s/ .*$//"` -hash=`sha1sum $file | sed "s/ .*$//"` -if [ ! -f "$REPO/@ID@/$hash" ]; then - install -m 644 -o $USER -g $USER -T "$file" "$REPO/@ID@/$hash" -fi -echo "$hash" >> "$out" - diff --git a/rvs/plugins/files/bin/commit.sh b/rvs/plugins/files/bin/commit.sh deleted file mode 100644 index 63eaac1..0000000 --- a/rvs/plugins/files/bin/commit.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -name='rvs files commit' -ver=0.9 -# Copyright (C) 2009-2010 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -source "$libexecdir/@ID@/stdio" - -# commit FILE -file=${1-.} # take arg1 as the file, default to the current directory - -if [ ! -e "$file" ]; then - error "file \`$file' does not exist"; -else - foundMod='false'; - for type in select/*; do - if "$type" "$file"; then foundMod='true'; break; fi - done - if [ "$foundMod" == 'false' ]; then - error "cannot handle file type of \`$file'" - fi -fi - diff --git a/rvs/plugins/files/bin/get.d.sh b/rvs/plugins/files/bin/get.d.sh deleted file mode 100644 index 46e1eeb..0000000 --- a/rvs/plugins/files/bin/get.d.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -name='rvs files get.d' -ver=0.9 -# Copyright (C) 2009 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -#source "$libexecdir/@ID@/stdio" - -# get.d ID DIRNAME -id="$1" -dir="$2" - -tmp=`mktemp` -"$RVS" get.f "$id" "$tmp" - -#install -d "$dir" -mkdir -p "$dir" - -cd "$dir" -rm -rf ./* -while read line; do - # GNU bash optimized version - #hash=${line/#*:/} - #name=${line/%:${hash}/} - # POSIX version - hash=`echo "$line" | sed 's/^.*://'` - name=`echo "$line" | sed "s/:$hash$//"` - "$RVS" get "$hash" "$name" -done < "$tmp" - -rm "$tmp" - diff --git a/rvs/plugins/files/bin/get.f.sh b/rvs/plugins/files/bin/get.f.sh deleted file mode 100644 index e6b79d5..0000000 --- a/rvs/plugins/files/bin/get.f.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -name='rvs files get.f' -ver=0.9 -# Copyright (C) 2009 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -#source "$libexecdir/@ID@/stdio" - -# get.f ID FILENAME -id="$1" -file="$2" - -install -T "$REPO/@ID@/$id" "$file" - diff --git a/rvs/plugins/files/bin/get.sh b/rvs/plugins/files/bin/get.sh deleted file mode 100644 index 4d0d48f..0000000 --- a/rvs/plugins/files/bin/get.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -name='rvs files get' -ver=0.9 -# Copyright (C) 2009 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -source "$libexecdir/@ID@/stdio" - -# get ID [FILE] -id="$1" -tmp=`mktemp` -"$RVS" get.f "$id" "$tmp" -type="`sed -n 's/^type://p' "$tmp"`" -file="${2-`sed -n 's/^name://p' "$tmp"`}" -hash="`sed -n 's/^hash://p' "$tmp"`" - -out "-$type `pwd`/$file" -"$RVS" get.$type "$hash" "$file" - -rm "$tmp" - diff --git a/rvs/plugins/files/etc/3-d.sh b/rvs/plugins/files/etc/3-d.sh deleted file mode 100644 index 91163dc..0000000 --- a/rvs/plugins/files/etc/3-d.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -#name='' -#ver=0.9 -# Copyright (C) 2009-2010 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -if [ -f $file ]; then echo 'd'; fi diff --git a/rvs/plugins/files/etc/5-f.sh b/rvs/plugins/files/etc/5-f.sh deleted file mode 100644 index 975992a..0000000 --- a/rvs/plugins/files/etc/5-f.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -#name='' -#ver=0.9 -# Copyright (C) 2009-2010 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -if [ -f $file ]; then echo 'f'; fi diff --git a/rvs/plugins/files/info.mk.in b/rvs/plugins/files/info.mk.in deleted file mode 100644 index 7552306..0000000 --- a/rvs/plugins/files/info.mk.in +++ /dev/null @@ -1,3 +0,0 @@ -name = files -ver = 0.9 -priority = 0 diff --git a/rvs/plugins/files/lib/stdio.sh b/rvs/plugins/files/lib/stdio.sh deleted file mode 100644 index 9062683..0000000 --- a/rvs/plugins/files/lib/stdio.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -#name='rvs files stdio' -#ver=0.9 -# Copyright (C) 2009 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -verbose() { - if [ "$volume" == '-v' ]; then - echo $@ >> /dev/stderr - fi -} - -out() { - if [ "$volume" != '-q' ]; then - echo $@ >> /dev/stderr - fi -} - -warn () { - echo "$name: $1" >> /dev/stderr -} - -fatal () { - warn "$1" - exit 1 -} - -error() { - warn "$1" - cat << __error__ >> /dev/stderr -Usage: $name $usage - -Try \`$name --help\' for more options. -__error__ - 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/rvs/plugins/plugin.mk.in b/rvs/plugins/plugin.mk.in index f8a42b4..250f03a 100644 --- a/rvs/plugins/plugin.mk.in +++ b/rvs/plugins/plugin.mk.in @@ -28,7 +28,7 @@ dirs += $(sysconfdir) $(BINDIR) $(TMPDIR) $(LIBDIR) $(ETCDIR) rvs = @rvs@ RVS = @RVS@ -id = $(name)-$(ver) +id = $(name) # phony targets #################################################### all : $(name) @@ -86,7 +86,6 @@ $(shOutFiles) : % : %.sh $(INSTALL_PROGRAM) $< $@ $(SED) -i \ -e 's/$bSHELL@/$(subst /,\/,$(SHELL))/g' \ - -e 's/$blibexecdir@/$(subst /,\/,$(libexecdir))/g' \ -e 's/$bID@/$(subst /,\/,$(id))/g' \ $@ diff --git a/rvs/plugins/users/bin/commit.sh b/rvs/plugins/users/bin/commit.sh deleted file mode 100644 index 1fa2e52..0000000 --- a/rvs/plugins/users/bin/commit.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -name='rvs users commit' -ver=0.9 -# Copyright (C) 2009 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -source "$libexecdir/@ID@/stdio" - -ret=`$RVS repo-0.7beta/commit $@` -if [ -f "$REPO/@ID@/user" ]; then - cp "$REPO/@ID@/user" "$REPO/@ID@/repo/$ret" - echo "$ret" -else - error 'you must be logged in to commit files' -fi - diff --git a/rvs/plugins/users/bin/init.sh b/rvs/plugins/users/bin/init.sh deleted file mode 100644 index 142f54c..0000000 --- a/rvs/plugins/users/bin/init.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -name='rvs users init' -ver=0.9 -# Copyright (C) 2009 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -#source "$libexecdir/@ID@/stdio" - -mkdir -p "$REPO/@ID@"/{users,repo} -cat << __EOF__ > "$REPO/@ID@/users/Public Domain" -author:anonymous -owner:Public Domain -license: -__EOF__ - diff --git a/rvs/plugins/users/bin/login.sh b/rvs/plugins/users/bin/login.sh deleted file mode 100644 index 40a5830..0000000 --- a/rvs/plugins/users/bin/login.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -name='rvs users login' -ver=0.9 -# Copyright (C) 2009 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -source "$libexecdir/@ID@/stdio" - -user="$1" -if [ -f "$REPO/@ID@/users/$user" ]; then - install -m 644 -T "$REPO/@ID@/users/$user" "$REPO/@ID@/../user" -else - error "User \`$user' does not exist" -fi - diff --git a/rvs/plugins/users/bin/logout.sh b/rvs/plugins/users/bin/logout.sh deleted file mode 100644 index 260846e..0000000 --- a/rvs/plugins/users/bin/logout.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -name='rvs users logout' -ver=0.9 -# Copyright (C) 2009 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -source "$libexecdir/@ID@/stdio" - -if [ -f "$REPO/@ID@/../user" ]; then - rm "$REPO/@ID@/../user" -else - error 'you must be logged in to logout' -fi - diff --git a/rvs/plugins/users/bin/mkuser.sh b/rvs/plugins/users/bin/mkuser.sh deleted file mode 100644 index 6f72ea9..0000000 --- a/rvs/plugins/users/bin/mkuser.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -name='rvs users mkuser' -ver=0.9 -# Copyright (C) 2009 Luke Shumaker -# -# This file is part of rvs. -# -# rvs 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, or (at your option) any later version. -# -# rvs 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 rvs; see the file COPYING. -# If not, write to the Free Software Foundation, -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -source "$libexecdir/@ID@/stdio" - -author="$1" -touch "$REPO/@ID@/users/$author" -cat << __EOF__ > "$REPO/@ID@/users/$author" -author:$author -__EOF__ - diff --git a/rvs/plugins/users/bin/rmuser.sh b/rvs/plugins/users/bin/rmuser.sh deleted file mode 100644 index 604f359..0000000 --- a/rvs/plugins/users/bin/rmuser.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -name='rvs users rmuser' -ver=0.9 -# Copyright (C) 2009 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -source "$libexecdir/@ID@/stdio" - -user="$1" -if [ -f "$REPO/@ID@/users/$user" ]; then - rm "$REPO/@ID@/users/$user" -else - error "User \`$user' does not exist" -fi - diff --git a/rvs/plugins/users/info.mk.in b/rvs/plugins/users/info.mk.in deleted file mode 100644 index 094f2a5..0000000 --- a/rvs/plugins/users/info.mk.in +++ /dev/null @@ -1,3 +0,0 @@ -name = users -ver = 0.9 -priority = 2 diff --git a/rvs/plugins/users/lib/stdio.sh b/rvs/plugins/users/lib/stdio.sh deleted file mode 100644 index edf7c01..0000000 --- a/rvs/plugins/users/lib/stdio.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -#name='rvs users stdio' -#ver=0.9 -# Copyright (C) 2009 Luke Shumaker -# -# This program 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. -# -# 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. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -verbose() { - if [ "$volume" == '-v' ]; then - echo $@ >> /dev/stderr - fi -} - -out() { - if [ "$volume" != '-q' ]; then - echo $@ - fi -} - -warn () { - echo "$name: $1" >> /dev/stderr -} - -fatal () { - warn "$1" - exit 1 -} - -error() { - warn "$1" - cat << __error__ >> /dev/stderr -Usage: $name $usage - -Try \`$name --help\' for more options. -__error__ - 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/rvs/wrapper/rvs.sh b/rvs/wrapper/rvs.sh index 2e8f4ca..bac92e5 100644 --- a/rvs/wrapper/rvs.sh +++ b/rvs/wrapper/rvs.sh @@ -18,9 +18,9 @@ ver='0.9' # along with this program; see the file COPYING. # If not, see . -export RVS="$0" #RVS="@rvs@" +export RVS="$0" #RVS="@RVS@" export BINDIR="@BINDIR@" -export TMPDIR="@TMPDIR@" + baseTMPDIR="@TMPDIR@" export LIBDIR="@LIBDIR@" export ETCDIR="@ETCDIR@" @@ -39,8 +39,7 @@ _error() { _repo() { repo=".$name" - pwd=`pwd` - owd="$pwd" # old working directory + owd="`pwd`" # old working directory # [----can ascend-----] && [-haven't found repo-] while [ "$pwd" != "`pwd`" ] && [ ! -e "`pwd`/$repo" ]; do @@ -61,25 +60,34 @@ _repo() { # Modules ############################################################ _runcom() { - command=${$1?"usage: rvs runcom COMMAND"}; shift + usage="usage: $RVS runcom COMMAND" + command=${1?"$usage"}; shift + if [ ! -e "$BINDIR/$command" ]; then _error "cannot find command \`$command" else + mkdir -p "$baseTMPDIR" + export TMPDIR=`mktemp -d --tmpdir="$baseTMPDIR"` + if [ -f "$BINDIR/$command" ]; then exec "$BINDIR/$command" $@ | tee "$TMPDIR/$command" elif [ -d "$BINDIR/$command" ]; then + mkdir -p "$TMPDIR/$command" for file in "$BINDIR/$command"/*; do - id=$(echo $file | sed 's/^[0-9]*-//') - exec "$file" $@ | tee "TMPDIR/$command/$id" + id=`basename "$file" | sed 's/^[0-9]*-//'` + "$file" $@ > "$TMPDIR/$command/$id" done + cat "$TMPDIR/$command/$id" else _error "cannot run \`$command'" fi + rm -rf "$TMPDIR" fi } _nextpriority() { - command=${1?"usage: rvs nextpriority COMMAND"} + usage="usage: $RVS nextpriority COMMAND" + command=${1?"$usage"} for file in "$BINDIR/$command"/*; do echo $file | sed 's/^\([0-9]*\)-.*/\1/' done | sort -n | tail -n1 | xargs expr 1 + @@ -92,7 +100,7 @@ _nextpriority() { _init() { REPO=`_repo 2> /dev/null` if [ -z "$REPO" ]; then - export REPO="`pwd`.$name" + export REPO="`pwd`/.$name" install -d "$REPO" _runcom init else @@ -105,9 +113,10 @@ _init() { ################################################################################ _install() { - file=${1?"usage: $RVS install FILE COMMAND ID [PRIORITY]"} - command=${2?"usage: $RVS install FILE COMMAND ID [PRIORITY]"} - id=${3?"usage: $RVS install FILE COMMAND ID [PRIORITY]"} + usage="usage: $RVS install FILE COMMAND ID [PRIORITY]" + file=${1?"$usage"} + command=${2?"$usage"} + id=${3?"$usage"} priority=${4-"`_nextpriority "$command"`"} install -d "$BINDIR/$command" @@ -115,7 +124,8 @@ _install() { } _uninstall() { - command=${1?"usage: $RVS uninstall COMMAND [ID]"} + usage="usage: $RVS uninstall COMMAND [ID]" + command=${1?"$usage"} id=$2 if [ -z "$id" ]; then @@ -139,6 +149,7 @@ com=$1; # END OPTION HANDLING # case "$com" in '') _error 'no command specified';; + repo) _repo; exit $?;; 'init' ) shift; _init $@; exit $?;; 'install') shift; _install $@; exit $?;; 'uninstall') shift; _uninstall $@; exit $?;; @@ -149,7 +160,7 @@ case "$com" in _runcom $@ exit $? else - _error 'cannot find an existing repository' + exit 1 fi :;; esac -- cgit v1.1-4-g5e80