diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2009-08-05 12:29:12 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-06-26 00:30:13 -0600 |
commit | 2d9534da516df2130d3f3b17eb4ae039cc47d4cf (patch) | |
tree | 3db2e3c76ead77e7d4071cbd93c7e67f04a4f651 /rvs.sh | |
parent | fc8d2f56a8104e755766fbbca4729906000cf78d (diff) |
0.7.3 -- more robust copyright notices in files
Diffstat (limited to 'rvs.sh')
-rw-r--r-- | rvs.sh | 50 |
1 files changed, 30 insertions, 20 deletions
@@ -1,13 +1,23 @@ #!@SHELL@ name='@name@' -ver='0.7.2' -# Copyright (C) 2009 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>. +ver='0.7.3' +# Copyright (C) 2009 Luke Shumaker +# +# This file is part of rvs. +# +# rvs 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, or (at your option) any later version. +# +# rvs 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 rvs; see the file COPYING. +# If not, write to the Free Software Foundation, +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. RVS="$0" #RVS="@rvs@" libexecdir="@libexecdir@/$name" @@ -40,13 +50,13 @@ _init() { if [ -z "$repo" ]; then repo=".$name" install -d "$repo" - install -T $RVSDIR/plugins $repo/plugins + install -T $libexecdir/plugins $repo/plugins while read plugin; do echo "initializing plugin \`$plugin'" install -d "$repo/$plugin" export REPO=.rvs/$plugin - if [ -e "$RVSDIR/$plugin/init" ]; then - "$RVSDIR/$plugin/init" + if [ -e "$libexecdir/$plugin/init" ]; then + "$libexecdir/$plugin/init" fi done < $repo/plugins else @@ -58,21 +68,21 @@ _install() { id=$1 dir=${2-$id} name=`echo $id | sed 's/-.*$//'` - if (grep "^$name-" "$RVSDIR/plugins" &> /dev/null); then + if (grep "^$name-" "$libexecdir/plugins" &> /dev/null); then # an entry for this plugin already exists, though possibly a # different version - sed -i "s/^$name-.*$/$id/" "$RVSDIR/plugins" + sed -i "s/^$name-.*$/$id/" "$libexecdir/plugins" else - echo "$id" >> "$RVSDIR/plugins" + echo "$id" >> "$libexecdir/plugins" fi - rm -rf "$RVSDIR/$id" - cp -rpT "$dir" "$RVSDIR/$id" + rm -rf "$libexecdir/$id" + cp -rpT "$dir" "$libexecdir/$id" } _uninstall() { id=$1 - sed -i "/^$id$/ d" "$RVSDIR/plugins" - rm -rf "$RVSDIR/$id" + sed -i "/^$id$/ d" "$libexecdir/plugins" + rm -rf "$libexecdir/$id" } # START OPTION HANDLING # @@ -87,12 +97,12 @@ case "$com" in *) repo=`_repo` if [ "$?" = '0' ]; then while read plugin; do - if [ -f "$RVSDIR/$plugin/$com" ]; then + if [ -f "$libexecdir/$plugin/$com" ]; then done='yes' export libexecdir=$libexecdir/$plugin export REPO=$repo/$plugin export RVS - $RVSDIR/$@ + $libexecdir/$@ exit $? break fi |