summaryrefslogtreecommitdiff
path: root/modules/comments
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comments')
l---------modules/comments/Makefile1
-rw-r--r--modules/comments/Makefile.inc.mk2
-rw-r--r--modules/comments/Module.mk1
-rw-r--r--modules/comments/comment.sh26
-rw-r--r--modules/comments/commit.sh24
-rw-r--r--modules/comments/print.sh28
-rw-r--r--modules/comments/showcomment.sh27
7 files changed, 109 insertions, 0 deletions
diff --git a/modules/comments/Makefile b/modules/comments/Makefile
new file mode 120000
index 0000000..fa7273c
--- /dev/null
+++ b/modules/comments/Makefile
@@ -0,0 +1 @@
+../module.mk \ No newline at end of file
diff --git a/modules/comments/Makefile.inc.mk b/modules/comments/Makefile.inc.mk
new file mode 100644
index 0000000..d5632d7
--- /dev/null
+++ b/modules/comments/Makefile.inc.mk
@@ -0,0 +1,2 @@
+am_src_files += comment.sh commit.sh print.sh showcomment.sh
+sm_out_files += comment commit print showcomment
diff --git a/modules/comments/Module.mk b/modules/comments/Module.mk
new file mode 100644
index 0000000..3fa49ac
--- /dev/null
+++ b/modules/comments/Module.mk
@@ -0,0 +1 @@
+commit/comments : commit/blobs
diff --git a/modules/comments/comment.sh b/modules/comments/comment.sh
new file mode 100644
index 0000000..aa615ca
--- /dev/null
+++ b/modules/comments/comment.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+name='comment'
+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>.
+
+usage="usage: $RVS $name ID"
+id="${1?"$usage"}"
+
+file="$REPO/@ID@/$id"
+mkdir -p "`dirname "$file"`"
+editor "$file" >> /dev/stderr
+
diff --git a/modules/comments/commit.sh b/modules/comments/commit.sh
new file mode 100644
index 0000000..4163387
--- /dev/null
+++ b/modules/comments/commit.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+name='rvs @ID@ commit'
+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>.
+
+if [ "$RVS_LEVEL" = '0' ]; then
+ id=`cat "$TMPDIR/commit/files"`
+ "$RVS" comment "$id"
+fi
+
diff --git a/modules/comments/print.sh b/modules/comments/print.sh
new file mode 100644
index 0000000..bef8e87
--- /dev/null
+++ b/modules/comments/print.sh
@@ -0,0 +1,28 @@
+#!/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>.
+
+usage="Usage: $RVS $name ID"
+id="${1?"$usage"}"
+
+file="$REPO/@ID@/$id"
+if [ -e "$file" ]; then
+ echo "Comment:"
+ sed 's/\(.*\)/ > \1/' "$file"
+fi
+
diff --git a/modules/comments/showcomment.sh b/modules/comments/showcomment.sh
new file mode 100644
index 0000000..3e4e943
--- /dev/null
+++ b/modules/comments/showcomment.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+name='showcomment'
+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>.
+
+usage="Usage: $RVS $name ID"
+id="${1?"$usage"}"
+
+file="$REPO/@ID@/$id"
+if [ -e "$file" ]; then
+ cat "$file"
+fi
+