diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-07-01 23:22:00 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-07-01 23:22:00 -0600 |
commit | 504d11ded8c1e9a0757332f2a10ed7d86dd5fc70 (patch) | |
tree | a3bba73ac491feaaecddca3345d8a54c5673bf72 /modules/comments | |
parent | 04b12bbea2be03a988e773afcd014a74d37ddca5 (diff) |
A whole bunch of stuff
Diffstat (limited to 'modules/comments')
l--------- | modules/comments/Makefile | 1 | ||||
-rw-r--r-- | modules/comments/Makefile.inc.mk | 2 | ||||
-rw-r--r-- | modules/comments/Module.mk | 2 | ||||
-rw-r--r-- | modules/comments/comment.sh | 26 | ||||
-rw-r--r-- | modules/comments/commit.sh | 24 | ||||
-rw-r--r-- | modules/comments/print.sh | 28 | ||||
-rw-r--r-- | modules/comments/showcomment.sh | 27 |
7 files changed, 110 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..6816836 --- /dev/null +++ b/modules/comments/Makefile.inc.mk @@ -0,0 +1,2 @@ +src_files += comment.sh commit.sh print.sh showcomment.sh +out_files += comment commit print showcomment diff --git a/modules/comments/Module.mk b/modules/comments/Module.mk new file mode 100644 index 0000000..a5bbb81 --- /dev/null +++ b/modules/comments/Module.mk @@ -0,0 +1,2 @@ +commit/comments :: commit/files + diff --git a/modules/comments/comment.sh b/modules/comments/comment.sh new file mode 100644 index 0000000..0be99e5 --- /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..d13d754 --- /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..b04a9cc --- /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..efbc00a --- /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 + |