summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/repo/commit.d.sh5
-rw-r--r--plugins/repo/get.d.sh10
-rw-r--r--plugins/repo/get.sh10
-rw-r--r--plugins/repo/lib/stdio.sh5
-rw-r--r--plugins/users/mkuser.sh2
-rw-r--r--rvs.sh5
6 files changed, 24 insertions, 13 deletions
diff --git a/plugins/repo/commit.d.sh b/plugins/repo/commit.d.sh
index eabdc78..3c6709d 100644
--- a/plugins/repo/commit.d.sh
+++ b/plugins/repo/commit.d.sh
@@ -13,9 +13,10 @@ ver='0.7.0'
# commit.d DIRNAME
dir="$1"
-
tmp=`tempfile`
-for file in $dir/*; do
+
+cd "$dir"
+for file in *; do
hash=`"$RVSDIR/commit" "$file"`
echo "$file:$hash" >> "$tmp"
done
diff --git a/plugins/repo/get.d.sh b/plugins/repo/get.d.sh
index 9ef25b9..9b1b5bc 100644
--- a/plugins/repo/get.d.sh
+++ b/plugins/repo/get.d.sh
@@ -16,9 +16,13 @@ id="$1"
dir="$2"
tmp=`tempfile`
-"$RVSDIR/get.f" `sed -n 's/^hash://p' "$db"` "$tmp"
+"$RVSDIR/get.f" "$id" "$tmp"
-mkdir "$dir"
+#install -d "$dir"
+mkdir -p "$dir"
+
+cd "$dir"
+rm -rf ./*
while read line; do
# GNU bash optimized version
#hash=${line/#*:/}
@@ -26,7 +30,7 @@ while read line; do
# POSIX version
hash=`echo "$line" | sed 's/^.*://'`
name=`echo "$line" | sed "s/:$hash$//"`
- "$RVSDIR/get" "$dir/$file"
+ "$RVSDIR/get" "$hash" "$name"
done < "$tmp"
rm "$tmp"
diff --git a/plugins/repo/get.sh b/plugins/repo/get.sh
index 5618d0a..fcb602a 100644
--- a/plugins/repo/get.sh
+++ b/plugins/repo/get.sh
@@ -9,16 +9,18 @@ ver='0.7.0'
#
# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
-#source "$RVSDIR/lib/stdio"
+source "$RVSDIR/lib/stdio"
# get ID [FILE]
id="$1"
-
tmp=`tempfile`
"$RVSDIR/get.f" "$id" "$tmp"
-type=`sed -n 's/^type://p' "$tmp"`
+type="`sed -n 's/^type://p' "$tmp"`"
file="${2-`sed -n 's/^name://p' "$tmp"`}"
+hash="`sed -n 's/^hash://p' "$tmp"`"
-"$RVSDIR/get.$type" "$id" "$file"
+out "-$type `pwd`/$file:$hash"
+"$RVSDIR/get.$type" "$hash" "$file"
rm "$tmp"
+
diff --git a/plugins/repo/lib/stdio.sh b/plugins/repo/lib/stdio.sh
index f85b7fa..3207db8 100644
--- a/plugins/repo/lib/stdio.sh
+++ b/plugins/repo/lib/stdio.sh
@@ -11,18 +11,19 @@
verbose() {
if [ "$volume" == '-v' ]; then
- echo $@
+ echo $@ >> /dev/stderr
fi
}
out() {
if [ "$volume" != '-q' ]; then
- echo $@
+ echo $@ >> /dev/stderr
fi
}
warn () {
echo "$name: $1" >> /dev/stderr
+ echo "$name: $1" >> "$repo/../rvs.log"
}
fatal () {
diff --git a/plugins/users/mkuser.sh b/plugins/users/mkuser.sh
index de4aeea..f07235b 100644
--- a/plugins/users/mkuser.sh
+++ b/plugins/users/mkuser.sh
@@ -10,7 +10,9 @@ ver='0.7.0'
# Originally written by Luke Shumaker <lukeshu@sbcglobal.net>.
read -p 'username: ' author
+echo "$author"
read -p 'give copyright to: ' owner
+echo "$owner"
if [ "$owner" != 'Public Domain' ]; then
read -p 'use the license: ' license
else
diff --git a/rvs.sh b/rvs.sh
index 2c56eec..b2a3f93 100644
--- a/rvs.sh
+++ b/rvs.sh
@@ -29,7 +29,7 @@ _repo() {
if [ -e "`pwd`/$repo" ]; then
echo "`pwd`/$repo"
else
- _error "no $name repository found" >> /dev/stderr
+ _error "no $name repository found"
fi
cd "$owd"
}
@@ -64,7 +64,8 @@ _install() {
else
echo "$id" >> "$RVSDIR/plugins"
fi
- cp -rp "$dir" "$RVSDIR/$id"
+ rm -rf "$RVSDIR/$id"
+ cp -rpT "$dir" "$RVSDIR/$id"
}
_uninstall() {