summaryrefslogtreecommitdiff
path: root/rvs/wrapper/rvs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'rvs/wrapper/rvs.sh')
-rw-r--r--rvs/wrapper/rvs.sh21
1 files changed, 10 insertions, 11 deletions
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 <http://www.gnu.org/licenses>.
-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"