From 662ea51a86049853c0a8e279e5b515b80d5123d8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 14 Apr 2010 18:27:44 -0400 Subject: I'm commiting these partial changes in case I ever need to come back to it. See, I just had a brain-gasm on how I can make the module system better. --- rvs/wrapper/rvs.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'rvs/wrapper/rvs.sh') diff --git a/rvs/wrapper/rvs.sh b/rvs/wrapper/rvs.sh index c2e3594..101268f 100644 --- a/rvs/wrapper/rvs.sh +++ b/rvs/wrapper/rvs.sh @@ -18,11 +18,11 @@ ver='0.9' # along with this program; see the file COPYING. # If not, see . -export RVS="$0" #RVS="@RVS@" - BINDIR="@BINDIR@" - baseTMPDIR="@TMPDIR@" -export LIBDIR="@LIBDIR@" -export ETCDIR="@ETCDIR@" +export RVS="$0" #RVS='@RVS@' + BINDIR='@BINDIR@' + baseTMPDIR='@TMPDIR@' +export LIBDIR='@LIBDIR@' +export ETCDIR='@ETCDIR@' ################################################################################ # Internal use # @@ -75,7 +75,7 @@ _runcom() { exit 1 else mkdir -p "$baseTMPDIR" - export TMPDIR=`mktemp -d --tmpdir="$baseTMPDIR"` + export TMPDIR="`mktemp -d --tmpdir="$baseTMPDIR"`" if [ -z "$RVS_LEVEL" ]; then export RVS_LEVEL=0; @@ -88,10 +88,9 @@ _runcom() { elif [ -d "$BINDIR/$command" ]; then mkdir -p "$TMPDIR/$command" for file in "$BINDIR/$command"/*; do - id=`basename "$file" | sed 's/^[0-9]*-//'` - "$file" $@ > "$TMPDIR/$command/$id" + id="`basename "$file" | sed 's/^[0-9]*-//'`" + "$file" $@ | tee "$TMPDIR/$command/$id" done - cat "$TMPDIR/$command/$id" else exit 2 fi @@ -103,7 +102,7 @@ _nextpriority() { usage="usage: $RVS nextpriority COMMAND" command=${1?"$usage"} for file in "$BINDIR/$command"/*; do - echo $file | sed 's/^\([0-9]*\)-.*/\1/' + echo "$file" | sed 's/^\([0-9]*\)-.*/\1/' done | sort -n | tail -n1 | xargs expr 1 + } @@ -116,7 +115,7 @@ _init() { # 0 - fine # 1 - repo already exists # 2 - error running init commands - REPO=`_repo 2> /dev/null` + REPO="`_repo 2> /dev/null`" if [ -z "$REPO" ]; then export REPO="`pwd`/.$name" install -d "$REPO" -- cgit v1.2.3