summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/filedata/commit.sh3
-rw-r--r--plugins/filedata/get.sh2
-rw-r--r--plugins/files/commit.d.sh5
-rw-r--r--plugins/files/commit.f.sh5
4 files changed, 10 insertions, 5 deletions
diff --git a/plugins/filedata/commit.sh b/plugins/filedata/commit.sh
index 0f3b8d1..f046db4 100644
--- a/plugins/filedata/commit.sh
+++ b/plugins/filedata/commit.sh
@@ -17,8 +17,9 @@ ver=0.9
# along with this program; see the file COPYING.
# If not, see <http://www.gnu.org/licenses>.
+out="$1"
+file="$2"
hash="`cat /dev/stdin`"
-file="$1"
temp=`mktemp`
echo "Hash: $hash" > "$temp"
diff --git a/plugins/filedata/get.sh b/plugins/filedata/get.sh
index 52dbe26..321d5f8 100644
--- a/plugins/filedata/get.sh
+++ b/plugins/filedata/get.sh
@@ -17,5 +17,7 @@ ver=0.9
# along with this program; see the file COPYING.
# If not, see <http://www.gnu.org/licenses>.
+out="$1"
+
echo "yeah, this hasn't been coded yet, sorry!"
diff --git a/plugins/files/commit.d.sh b/plugins/files/commit.d.sh
index 2b3f022..f5b432b 100644
--- a/plugins/files/commit.d.sh
+++ b/plugins/files/commit.d.sh
@@ -20,7 +20,8 @@ ver=0.9
source "$libexecdir/@ID@/stdio"
# commit.d DIRNAME
-dir="$1"
+out="$1"
+dir="$2"
tmp=`mktemp`
cd "$dir"
@@ -29,6 +30,6 @@ for file in *; do
echo "$file:$hash" >> "$tmp"
done
-"$RVS" commit.f "$tmp"
+"$RVS" commit.f "$out" "$tmp"
rm "$tmp"
diff --git a/plugins/files/commit.f.sh b/plugins/files/commit.f.sh
index bbcbbe4..a86e5b5 100644
--- a/plugins/files/commit.f.sh
+++ b/plugins/files/commit.f.sh
@@ -20,12 +20,13 @@ ver=0.9
#source "$libexecdir/@ID@/stdio"
# commit.f FILENAME
-file="$1"
+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"
+echo "$hash" >> "$out"