summaryrefslogtreecommitdiff
path: root/plugins/files
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/files')
-rw-r--r--plugins/files/bin/blob-gethash.sh26
-rw-r--r--plugins/files/bin/blob-gettype.sh26
-rw-r--r--plugins/files/bin/commit.d.sh42
-rw-r--r--plugins/files/bin/commit.f.sh32
-rw-r--r--plugins/files/bin/commit.sh27
-rw-r--r--plugins/files/bin/file-gettype.sh39
-rw-r--r--plugins/files/bin/get.d.sh46
-rw-r--r--plugins/files/bin/get.f.sh29
-rw-r--r--plugins/files/bin/get.sh32
-rw-r--r--plugins/files/bin/ls.sh50
-rw-r--r--plugins/files/bin/print.sh39
-rw-r--r--plugins/files/bin/tree.sh40
-rw-r--r--plugins/files/dep0
-rw-r--r--plugins/files/etc/3-d.sh3
-rw-r--r--plugins/files/etc/5-f.sh3
-rw-r--r--plugins/files/info.mk.in3
-rw-r--r--plugins/files/lib/stdio.sh74
17 files changed, 0 insertions, 511 deletions
diff --git a/plugins/files/bin/blob-gethash.sh b/plugins/files/bin/blob-gethash.sh
deleted file mode 100644
index 74defbc..0000000
--- a/plugins/files/bin/blob-gethash.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-name='blob-gethash'
-ver=0.9
-# Copyright (C) 2009-2010 Luke Shumaker
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-. "$LIBDIR/@ID@/stdio"
-
-usage="ID"
-id="`getvar "$1"`"
-
-echo $id | sed 's/.*://'
-
diff --git a/plugins/files/bin/blob-gettype.sh b/plugins/files/bin/blob-gettype.sh
deleted file mode 100644
index da3ee2a..0000000
--- a/plugins/files/bin/blob-gettype.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-name='blob-gettype'
-ver=0.9
-# Copyright (C) 2009-2010 Luke Shumaker
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-. "$LIBDIR/@ID@/stdio"
-
-usage="ID"
-id="`getvar "$1"`"
-
-echo $id | sed 's/:.*//'
-
diff --git a/plugins/files/bin/commit.d.sh b/plugins/files/bin/commit.d.sh
deleted file mode 100644
index d7e48f9..0000000
--- a/plugins/files/bin/commit.d.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-name='commit.d'
-ver=0.9
-# Copyright (C) 2009-2010 Luke Shumaker
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-. "$LIBDIR/@ID@/stdio"
-
-usage="DIRNAME"
-dir="`getvar "$1"`"
-
-tmp=`mktemp`
-t=' ';
-
-cd "$dir"
-for file in *; do
- p="`stat "$file" -c'%a' `" # permissions
- o="`stat "$file" -c'%u (%U)'`" # owner
- g="`stat "$file" -c'%g (%G)'`" # group
- i="`"$RVS" commit "$file"`" # ID
- n="$file" # name
-
- # %p %o %g %i %n
- echo "$p$t$o$t$g$t$i$t$n" >> "$tmp"
-done
-
-"$RVS" commit.f "$tmp" d
-rm "$tmp"
-
diff --git a/plugins/files/bin/commit.f.sh b/plugins/files/bin/commit.f.sh
deleted file mode 100644
index e0df1b2..0000000
--- a/plugins/files/bin/commit.f.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-name='commit.f'
-ver=0.9
-# Copyright (C) 2009-2010 Luke Shumaker
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-. "$LIBDIR/@ID@/stdio"
-
-usage="FILENAME [TYPE]"
-file="`getvar "$1"`"
-prefix="${2-f}"
-
-hash=`sha1sum $file | sed "s/ .*$//"`
-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"
-
diff --git a/plugins/files/bin/commit.sh b/plugins/files/bin/commit.sh
deleted file mode 100644
index 0bb8233..0000000
--- a/plugins/files/bin/commit.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-name='commit'
-ver=0.9
-# Copyright (C) 2009-2010 Luke Shumaker
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-. "$LIBDIR/@ID@/stdio"
-
-usage="[FILE]"
-file=${1-.} # take arg1 as the file, default to the current directory
-
-type=`"$RVS" file-gettype "$file"`
-"$RVS" "commit.$type" "$file"
-
diff --git a/plugins/files/bin/file-gettype.sh b/plugins/files/bin/file-gettype.sh
deleted file mode 100644
index 2a1e0ca..0000000
--- a/plugins/files/bin/file-gettype.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-name='file-gettype'
-ver=0.9
-# Copyright (C) 2009-2010 Luke Shumaker
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-. "$LIBDIR/@ID@/stdio"
-
-usage="FILE"
-file="`getvar "$1"`"
-
-if [ ! -e "$file" ]; then
- fatal "file \`$file' does not exist";
-else
- type=''
- for check in "$ETCDIR/@ID@/"*; do
- type=`"$check" "$file"`
- if [ -n "$type" ]; then break; fi
- done
- if [ -n "$type" ]; then
- echo "$type"
- else
- fatal "cannot handle file type of \`$file'"
- fi
-fi
-
diff --git a/plugins/files/bin/get.d.sh b/plugins/files/bin/get.d.sh
deleted file mode 100644
index 646e29d..0000000
--- a/plugins/files/bin/get.d.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-name='get.d'
-ver=0.9
-# Copyright (C) 2009-2010 Luke Shumaker
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-. "$LIBDIR/@ID@/stdio"
-
-usage="DIRNAME ID"
-dir="`getvar "$1"`"
- id="`getvar "$2"`"
-
-tmp=`mktemp`
-"$RVS" get.f "$tmp" "$id"
-
-#install -d "$dir"
-mkdir -p "$dir"
-
-cd "$dir"
-rm -rf ./*
-while read line; do
- p="`echo "$line" | cut -f1`" # permissions
- o="`echo "$line" | cut -f2`" # owner
- g="`echo "$line" | cut -f3`" # group
- i="`echo "$line" | cut -f4`" # ID
- n="`echo "$line" | cut -f5-`" # name
- "$RVS" get "$n" "$i"
- chmod "$p" "$n"
- #chown "$o:$g" "$n"
-done < "$tmp"
-
-rm "$tmp"
-
diff --git a/plugins/files/bin/get.f.sh b/plugins/files/bin/get.f.sh
deleted file mode 100644
index e3d5edc..0000000
--- a/plugins/files/bin/get.f.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-name='get.f'
-ver=0.9
-# Copyright (C) 2009-2010 Luke Shumaker
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-. "$LIBDIR/@ID@/stdio"
-
-usage="FILENAME ID"
-name="`getvar "$1"`"
- id="`getvar "$2"`"
-
-hash="`"$RVS" blob-gethash "$id"`"
-
-install -T "$REPO/@ID@/$hash" "$name"
-
diff --git a/plugins/files/bin/get.sh b/plugins/files/bin/get.sh
deleted file mode 100644
index 639ac57..0000000
--- a/plugins/files/bin/get.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-name='get'
-ver=0.9
-# Copyright (C) 2009-2010 Luke Shumaker
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-. "$LIBDIR/@ID@/stdio"
-
-usage="FILENAME ID"
-name="`getvar "$1"`"
- id="`getvar "$2"`"
-
-file="$REPO/@ID@/$id"
-
-type="`"$RVS" blob-gettype "$id"`"
-#hash="`"$RVS" blob-gethash "$id"`"
-
-"$RVS" "get.$type" "$name" "$id"
-
diff --git a/plugins/files/bin/ls.sh b/plugins/files/bin/ls.sh
deleted file mode 100644
index 9e586eb..0000000
--- a/plugins/files/bin/ls.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env bash
-name='ls'
-ver=0.1
-# Copyright (C) 2010 Luke Shumaker
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-. "$LIBDIR/@ID@/stdio"
-
-usage="DIR_ID [FORMAT]"
-id="`getvar "$1"`"
-form="${2-%p\t%o\t%g\t%n\t%i}"
-
-# %p - permissions
-# %o - owner
-# %g - group
-# %i - blob id
-# %n - name
-# \t - a tab char
-
-tmp="`mktemp`"
-"$RVS" get.f "$tmp" "$id"
-
-while read line; do
- p="`echo "$line" | cut -f1`"
- o="`echo "$line" | cut -f2`"
- g="`echo "$line" | cut -f3`"
- i="`echo "$line" | cut -f4`"
- n="`echo "$line" | cut -f5-`"
- echo "$form" | sed \
- -e 's:\\t:\t:g' \
- -e "s:%p:${p/:/\\:}:g" \
- -e "s:%o:${o/:/\\:}:g" \
- -e "s:%g:${g/:/\\:}:g" \
- -e "s:%i:${i/:/\\:}:g" \
- -e "s:%n:${n/:/\\:}:g"
-done < "$tmp"
-
diff --git a/plugins/files/bin/print.sh b/plugins/files/bin/print.sh
deleted file mode 100644
index 3657d2f..0000000
--- a/plugins/files/bin/print.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-name='print'
-ver=0.1
-# Copyright (C) 2010 Luke Shumaker
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-. "$LIBDIR/@ID@/stdio"
-
-usage='ID'
-id="`getvar "$1"`"
-
-hash="`"$RVS" blob-gethash "$id"`"
-file="$REPO/@ID@/$hash"
-
-if [ -e "$file" ]; then
- t="`"$RVS" blob-gettype "$id"`"
- type=''
- case "$t" in
- f) type='regular file';;
- d) type='directory';;
- esac
- echo "File Type: $t ($type)"
-else
- fatal "no object with ID \`$id'"
-fi
-
diff --git a/plugins/files/bin/tree.sh b/plugins/files/bin/tree.sh
deleted file mode 100644
index 6164d94..0000000
--- a/plugins/files/bin/tree.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env bash
-name='tree'
-ver=0.1
-# Copyright (C) 2010 Luke Shumaker
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-. "$LIBDIR/@ID@/stdio"
-
-usage="DIR_ID [NAME] [PREFIX] [LAST]"
-id="`getvar "$1"`"
-name="${2-.}"
-pref="$3"
-last="$4"
-
-echo "$pref $name $id"
-pref=' | '
-"$RVS" ls "$id" '%i\t%n' | while read line; do
- i="`echo "$line" | cut -f1`"
- n="`echo "$line" | cut -f2-`"
- t="`"$RVS" blob-gettype "$i"`"
- if [ "$t" = 'd' ]
- "$RVS" tree "$i" "$n" "$pref"
- else
- echo "$pref $n $i"
- fi
-done
-
diff --git a/plugins/files/dep b/plugins/files/dep
deleted file mode 100644
index e69de29..0000000
--- a/plugins/files/dep
+++ /dev/null
diff --git a/plugins/files/etc/3-d.sh b/plugins/files/etc/3-d.sh
deleted file mode 100644
index f169cae..0000000
--- a/plugins/files/etc/3-d.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-if [ -d "$1" ]; then echo 'd'; fi
-
diff --git a/plugins/files/etc/5-f.sh b/plugins/files/etc/5-f.sh
deleted file mode 100644
index 0506894..0000000
--- a/plugins/files/etc/5-f.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-if [ -f "$1" ]; then echo 'f'; fi
-
diff --git a/plugins/files/info.mk.in b/plugins/files/info.mk.in
deleted file mode 100644
index 78a0580..0000000
--- a/plugins/files/info.mk.in
+++ /dev/null
@@ -1,3 +0,0 @@
-name = files
-ver = 0.9
-
diff --git a/plugins/files/lib/stdio.sh b/plugins/files/lib/stdio.sh
deleted file mode 100644
index 974e98e..0000000
--- a/plugins/files/lib/stdio.sh
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/sh
-#name='stdio'
-#ver=0.9
-# Copyright (C) 2009-2010 Luke Shumaker
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; see the file COPYING.
-# If not, see <http://www.gnu.org/licenses>.
-
-verbose() {
- if [ "$volume" == '-v' ]; then
- echo $@ >> /dev/stderr
- fi
-}
-
-out() {
- if [ "$volume" != '-q' ]; then
- echo $@ >> /dev/stderr
- fi
-}
-
-warn () {
- echo "$name: $1" >> /dev/stderr
-}
-
-fatal () {
- warn "$1"
- exit 1
-}
-
-error() {
- warn "$1"
- cat << __error__ >> /dev/stderr
-Usage: $RVS $name $usage
-
-Try \`$RVS help $name' for more options.
-__error__
- exit 1
-}
-
-getvar() {
- if [ -z "$1" ]; then
- error
- else
- echo $1
- fi
-}
-
-version() {
- echo "$name $ver"
- if [ "$volume" != '-q' ]; then
- cat << __disclaimer__
-$name is copyright (C) 2009-2010 Luke Shumaker
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-Originally written by Luke Shumaker <LukeShu@sbcglobal.net>.
-__disclaimer__
- fi
- exit 0
-}
-