summaryrefslogtreecommitdiff
path: root/rvs/plugins/files/bin/commit.f.sh
diff options
context:
space:
mode:
Diffstat (limited to 'rvs/plugins/files/bin/commit.f.sh')
-rw-r--r--rvs/plugins/files/bin/commit.f.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/rvs/plugins/files/bin/commit.f.sh b/rvs/plugins/files/bin/commit.f.sh
index c27005b..e0df1b2 100644
--- a/rvs/plugins/files/bin/commit.f.sh
+++ b/rvs/plugins/files/bin/commit.f.sh
@@ -19,14 +19,14 @@ ver=0.9
. "$LIBDIR/@ID@/stdio"
-usage="FILENAME [PREFIX]"
+usage="FILENAME [TYPE]"
file="`getvar "$1"`"
prefix="${2-f}"
hash=`sha1sum $file | sed "s/ .*$//"`
-if [ ! -f "$REPO/@ID@/$prefix/$hash" ]; then
- mkdir -p "$REPO/@ID@/$prefix"
- install -m 644 -o $USER -g $USER -T "$file" "$REPO/@ID@/$prefix/$hash"
+if [ ! -f "$REPO/@ID@/$hash" ]; then
+ mkdir -p "$REPO/@ID@/"
+ install -m 644 -o $USER -g $USER -T "$file" "$REPO/@ID@/$hash"
fi
-echo "$prefix/$hash"
+echo "$prefix:$hash"