OSSP CVS Repository

ossp - Check-in [4897]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4897
Date: 2004-Dec-14 20:18:37 (local)
2004-Dec-14 19:18:37 (UTC)
User:rse
Branch:
Comment: initial cut for OSSP svs
Tickets:
Inspections:
Files:
ossp-pkg/svs/.cvsignore      added-> 1.1
ossp-pkg/svs/AUTHORS      added-> 1.1
ossp-pkg/svs/ChangeLog      added-> 1.1
ossp-pkg/svs/Makefile.in      added-> 1.1
ossp-pkg/svs/README      added-> 1.1
ossp-pkg/svs/THANKS      added-> 1.1
ossp-pkg/svs/VERSION      added-> 1.1
ossp-pkg/svs/configure.ac      added-> 1.1
ossp-pkg/svs/devtool      added-> 1.1
ossp-pkg/svs/devtool.conf      added-> 1.1
ossp-pkg/svs/devtool.func      added-> 1.1
ossp-pkg/svs/svs.pod      added-> 1.1
ossp-pkg/svs/svs.sh      added-> 1.1

ossp-pkg/svs/.cvsignore -> 1.1

*** /dev/null    Sat Apr 20 01:22:06 2024
--- -    Sat Apr 20 01:22:09 2024
***************
*** 0 ****
--- 1,5 ----
+ configure
+ shtool
+ Makefile
+ svs
+ svs.1


ossp-pkg/svs/AUTHORS -> 1.1

*** /dev/null    Sat Apr 20 01:22:06 2024
--- -    Sat Apr 20 01:22:09 2024
***************
*** 0 ****
--- 1,15 ----
+    _        ___  ____ ____  ____  
+   |_|_ _   / _ \/ ___/ ___||  _ \   _____   _____ 
+   _|_||_| | | | \___ \___ \| |_) | / __\ \ / / __|
+  |_||_|_| | |_| |___) |__) |  __/  \__ \\ V /\__ \
+   |_|_|_|  \___/|____/____/|_|     |___/ \_/ |___/
+ 
+   OSSP svs - Stupid/Silly/Simple Versioning System
+ 
+   This is a list of authors who have written
+   or edited parts of the OSSP svs sources.
+ 
+   o  OSSP svs (as a whole)
+      Written by: Ralf S. Engelschall
+      Edited  by: Ralf S. Engelschall
+ 


ossp-pkg/svs/ChangeLog -> 1.1

*** /dev/null    Sat Apr 20 01:22:06 2024
--- -    Sat Apr 20 01:22:09 2024
***************
*** 0 ****
--- 1,15 ----
+    _        ___  ____ ____  ____  
+   |_|_ _   / _ \/ ___/ ___||  _ \   _____   _____ 
+   _|_||_| | | | \___ \___ \| |_) | / __\ \ / / __|
+  |_||_|_| | |_| |___) |__) |  __/  \__ \\ V /\__ \
+   |_|_|_|  \___/|____/____/|_|     |___/ \_/ |___/
+ 
+   OSSP svs - Stupid/Silly/Simple Versioning System
+ 
+   ChangeLog
+ 
+   Changes between *GENESIS* and 1.0.0 (xx-Jun-2003 to 14-Dec-2004):
+ 
+     *) Created the initial version of OSSP svs.
+        [Ralf S. Engelschall]
+ 


ossp-pkg/svs/Makefile.in -> 1.1

*** /dev/null    Sat Apr 20 01:22:06 2024
--- -    Sat Apr 20 01:22:09 2024
***************
*** 0 ****
--- 1,87 ----
+ ##
+ ##  OSSP svs -- Stupid/Silly/Simple Versioning System
+ ##  Copyright (c) 2003-2004 Ralf S. Engelschall <rse@engelschall.com>
+ ##  Copyright (c) 2003-2004 The OSSP Project <http://www.ossp.org/>
+ ##
+ ##  This file is part of OSSP svs, a stupid/silly/simple versioning
+ ##  system which can found at http://www.ossp.org/pkg/tool/svs/
+ ##
+ ##  Permission to use, copy, modify, and distribute this software for
+ ##  any purpose with or without fee is hereby granted, provided that
+ ##  the above copyright notice and this permission notice appear in all
+ ##  copies.
+ ##
+ ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ ##  SUCH DAMAGE.
+ ##
+ ##  Makefile.in: make(1) build procedure
+ ##
+ 
+ @SET_MAKE@
+ 
+ #   installation paths
+ DESTDIR     =
+ prefix      = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir      = @bindir@
+ libdir      = @libdir@
+ includedir  = @includedir@
+ mandir      = @mandir@
+ 
+ #   build tools
+ RM          = rm -f
+ RMDIR       = rmdir
+ SHTOOL      = ./shtool
+ TRUE        = true
+ POD2MAN     = pod2man
+ 
+ #   default target
+ all: svs.1
+ 
+ svs.1: svs.pod
+        V1=`$(SHTOOL) version -l txt -d short VERSION`; \
+        V2=`$(SHTOOL) version -l txt -d long VERSION`; \
+        D=`$(SHTOOL) version -l txt -d long VERSION | sed -e 's;.*(;;' -e 's;).*;;'`; \
+        $(POD2MAN) --quotes=none \
+                   --section=1 --center="Stupid/Silly/Simple Versioning System" \
+                   --release="$$D" --date="OSSP svs $$V1" svs.pod | \
+        sed -e "s;SVS_VERSION_STR;$$V2;" >svs.1
+ 
+ #   perform installation procedure
+ install:
+        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(prefix)
+        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir)
+        $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1
+        $(SHTOOL) install -c -m 755 svs.sh $(DESTDIR)$(bindir)/svs
+        $(SHTOOL) install -c -m 644 svs.1 $(DESTDIR)$(mandir)/man1/svs.1
+ 
+ #   perform uninstallation procedure
+ uninstall:
+        -$(RM) $(DESTDIR)$(mandir)/bin/svs
+        -$(RM) $(DESTDIR)$(mandir)/man1/svs.1
+        -$(RMDIR) $(DESTDIR)$(mandir)/man1 >/dev/null 2>&1 || $(TRUE)
+        -$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE)
+        -$(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE)
+ 
+ #   perform build clean up procedure
+ clean:
+ 
+ #   perform distribution clean up procedure
+ distclean: clean
+        -$(RM) config.log config.status config.cache
+        -$(RM) Makefile
+ 
+ #   perform developer clean up procedure
+ realclean: distclean
+        -$(RM) svs.1
+ 


ossp-pkg/svs/README -> 1.1

*** /dev/null    Sat Apr 20 01:22:06 2024
--- -    Sat Apr 20 01:22:09 2024
***************
*** 0 ****
--- 1,50 ----
+    _        ___  ____ ____  ____  
+   |_|_ _   / _ \/ ___/ ___||  _ \   _____   _____ 
+   _|_||_| | | | \___ \___ \| |_) | / __\ \ / / __|
+  |_||_|_| | |_| |___) |__) |  __/  \__ \\ V /\__ \
+   |_|_|_|  \___/|____/____/|_|     |___/ \_/ |___/
+ 
+   OSSP svs - Stupid/Silly/Simple Versioning System
+   Version 1.0.0
+ 
+   ABSTRACT
+ 
+   OSSP svs is a simple frontend to diff(1) and patch(1). It provides a
+   convenient way for working with changes on textual files if no history
+   tracking and version control is necessary. This is especially the
+   case when having to patch pristine vendor sources for portability or
+   bugfixing reasons.
+ 
+   COPYRIGHT AND LICENSE
+ 
+   Copyright (c) 2003-2004 Ralf S. Engelschall <rse@engelschall.com>
+   Copyright (c) 2003-2004 The OSSP Project <http://www.ossp.org/>
+ 
+   This file is part of OSSP svs, a stupid/silly/simple versioning
+   system which can found at http://www.ossp.org/pkg/tool/svs/
+ 
+   Permission to use, copy, modify, and distribute this software for
+   any purpose with or without fee is hereby granted, provided that
+   the above copyright notice and this permission notice appear in all
+   copies.
+ 
+   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+   IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+   SUCH DAMAGE.
+ 
+   HOME AND DOCUMENTATION
+ 
+   The documentation and latest release can be found on
+ 
+   o http://www.ossp.org/pkg/tool/svs/
+   o  ftp://ftp.ossp.org/pkg/tool/svs/
+ 


ossp-pkg/svs/THANKS -> 1.1

*** /dev/null    Sat Apr 20 01:22:06 2024
--- -    Sat Apr 20 01:22:09 2024
***************
*** 0 ****
--- 1,17 ----
+    _        ___  ____ ____  ____  
+   |_|_ _   / _ \/ ___/ ___||  _ \   _____   _____ 
+   _|_||_| | | | \___ \___ \| |_) | / __\ \ / / __|
+  |_||_|_| | |_| |___) |__) |  __/  \__ \\ V /\__ \
+   |_|_|_|  \___/|____/____/|_|     |___/ \_/ |___/
+ 
+   OSSP svs - Stupid/Silly/Simple Versioning System
+ 
+   THANKS
+ 
+   Credit has to be given to the following people who contributed ideas,
+   stuff, bugfixes, hints etc. (in alphabetical order):
+ 
+   o Thomas Lotterer          <thomas@lotterer.net>
+ 
+   ...and all other OSSP svs users who gave me feedback but I've forgot.
+ 


ossp-pkg/svs/VERSION -> 1.1

*** /dev/null    Sat Apr 20 01:22:06 2024
--- -    Sat Apr 20 01:22:09 2024
***************
*** 0 ****
--- 1,6 ----
+ 
+   VERSION -- Version Information for OSSP svs (syntax: Text)
+   [automatically generated and maintained by GNU shtool]
+ 
+   This is OSSP svs, Version 1.0.0 (14-Dec-2004)
+ 


ossp-pkg/svs/configure.ac -> 1.1

*** /dev/null    Sat Apr 20 01:22:06 2024
--- -    Sat Apr 20 01:22:09 2024
***************
*** 0 ****
--- 1,46 ----
+ dnl ##
+ dnl ##  OSSP svs -- Stupid/Silly/Simple Versioning System
+ dnl ##  Copyright (c) 2003-2004 Ralf S. Engelschall <rse@engelschall.com>
+ dnl ##  Copyright (c) 2003-2004 The OSSP Project <http://www.ossp.org/>
+ dnl ##
+ dnl ##  This file is part of OSSP svs, a stupid/silly/simple versioning
+ dnl ##  system which can found at http://www.ossp.org/pkg/tool/svs/
+ dnl ##
+ dnl ##  Permission to use, copy, modify, and distribute this software for
+ dnl ##  any purpose with or without fee is hereby granted, provided that
+ dnl ##  the above copyright notice and this permission notice appear in all
+ dnl ##  copies.
+ dnl ##
+ dnl ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ dnl ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ dnl ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ dnl ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ dnl ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ dnl ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ dnl ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ dnl ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ dnl ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ dnl ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ dnl ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ dnl ##  SUCH DAMAGE.
+ dnl ##
+ dnl ##
+ dnl ##  configure.ac: GNU autoconf specification
+ dnl ##
+ 
+ AC_PREREQ(2.53)
+ AC_REVISION($1.0$)
+ AC_INIT(README)
+ 
+ SVS_VERSION_STR="`./shtool version -l txt -d long VERSION`"
+ ./shtool echo -e "Configuring %BOSSP svs%b (Stupid/Silly/Simple Versioning System), version %B${SVS_VERSION_STR}%b"
+ echo "Copyright (c) 2003-2004 Ralf S. Engelschall <rse@engelschall.com>"
+ echo "Copyright (c) 2003-2004 The OSSP Project <http://www.ossp.org/>"
+ AC_SUBST(SVS_VERSION_STR)
+ 
+ AC_PREFIX_DEFAULT(/usr/local)
+ AC_SET_MAKE
+ 
+ AC_CONFIG_FILES(Makefile)
+ AC_OUTPUT
+ 


ossp-pkg/svs/devtool -> 1.1

*** /dev/null    Sat Apr 20 01:22:06 2024
--- -    Sat Apr 20 01:22:09 2024
***************
*** 0 ****
--- 1,47 ----
+ #!/bin/sh
+ ##
+ ##  devtool -- Development Tool
+ ##  Copyright (c) 2001 Ralf S. Engelschall <rse@engelschall.com> 
+ ##
+ 
+ if [ $# -eq 0 ]; then
+     echo "devtool:USAGE: devtool <command> [<arg> ...]" 1>&2
+     exit 1
+ fi
+ 
+ cmd="$1"
+ shift
+ 
+ devtoolfunc="./devtool.func"
+ 
+ if [ ! -f devtool.conf ]; then
+     echo "devtool:ERROR: no devtool.conf in current directory" 1>&2
+     exit 1
+ fi
+ 
+ cmdline=`grep "^%$cmd" devtool.conf`
+ if [ ".$cmdline" = . ]; then
+     echo "devtool:ERROR: command $cmd not found in devtool.conf" 1>&2
+     exit 1
+ fi
+ 
+ if [ ".$TMPDIR" != . ]; then
+     tmpdir="$TMPDIR"
+ elif [ ".$TEMPDIR" != . ]; then
+     tmpdir="$TEMPDIR"
+ else
+     tmpdir="/tmp"
+ fi
+ tmpfile="$tmpdir/rc.$$.tmp"
+ 
+ rm -f $tmpfile
+ touch $tmpfile
+ echo ". $devtoolfunc" >>$tmpfile
+ ( sed <devtool.conf -e "1,/^%common/d" -e '/^%.*/,$d'
+   sed <devtool.conf -e "1,/^%$cmd/d" -e '/^%.*/,$d' ) |\
+ sed -e 's;\([  ]\)@\([a-zA-Z_][a-zA-Z0-9_]*\);\1devtool_\2;' >>$tmpfile
+ 
+ sh $tmpfile "$@"
+ 
+ rm -f $tmpfile >/dev/null 2>&1 || true
+ 


ossp-pkg/svs/devtool.conf -> 1.1

*** /dev/null    Sat Apr 20 01:22:06 2024
--- -    Sat Apr 20 01:22:09 2024
***************
*** 0 ****
--- 1,41 ----
+ ##
+ ##  devtool.conf -- Development Tool Configuration
+ ##
+ 
+ %autogen
+     @autogen autoconf 2.59 "2.5*"
+     @autogen shtool 2.0.1  "2.0.*" all
+ 
+ %autoclean
+     @autoclean autoconf
+     @autoclean shtool
+ 
+ %configure
+     ./configure --prefix=/tmp/svs "$@"
+ 
+ %version
+     ./shtool version -l txt -n "OSSP svs" -e VERSION
+     V=`./shtool version -l txt -d long VERSION`
+     sed -e "s/Version .*(.*)/Version $V/g" <README >README.n 
+     mv README.n README
+ 
+ %dist
+     echo "+++ generating"
+     ./devtool autoclean
+     ./devtool autogen
+     echo "+++ configuring"
+     ./configure
+     echo "+++ building"
+     make clean all
+     echo "+++ cleaning"
+     make distclean
+     echo "+++ fixing"
+     ./shtool fixperm -v .
+     echo "+++ rolling"
+     V=`./shtool version -l txt -d short VERSION`
+     ./shtool tarball -o svs-${V}.tar.gz -d svs-${V} -u ossp -g svs \
+                      -e 'CVS,\.cvsignore,\.[ao]$,^\.,devtool*,*.tar.gz' -c 'gzip --best' .
+     ls -l svs-${V}.tar.gz
+     echo "+++ testing"
+     gunzip <svs-${V}.tar.gz | tar tvf -
+ 


ossp-pkg/svs/devtool.func -> 1.1

*** /dev/null    Sat Apr 20 01:22:06 2024
--- -    Sat Apr 20 01:22:09 2024
***************
*** 0 ****
--- 1,73 ----
+ ##
+ ##  devtool.func -- Development Tool Functions
+ ##  Copyright (c) 2001-2004 Ralf S. Engelschall <rse@engelschall.com> 
+ ##
+ 
+ devtool_require () {
+     t="$1"; o="$2"; p="$3"; e="$4"; a="$5"
+     v=`($t $o | head -1 | awk "{ print \\\$$p; }") 2>/dev/null`
+     if [ ".$v" = . ]; then
+         echo "devtool:ERROR: unable to determine version of $t" 1>&2
+         exit 1
+     fi
+     case "$v" in
+         $e )
+             ;;
+         $a )
+             echo "devtool:WARNING: $t version $v still accepted, although expected $e." 1>&2
+             ;;
+         * )
+             echo "devtool:ERROR: $t version $e expected, but found $v." 1>&2
+             exit 1
+             ;;
+     esac
+     echo "$v"
+ }
+ 
+ devtool_autogen () {
+     tool=$1
+     shift
+     case $tool in
+         autoconf )
+             autoconf_version=`devtool_require autoconf --version 4 "$1" "$2"`
+             echo "generating (GNU Autoconf $autoconf_version): configure config.h.in"
+             autoconf
+             #autoheader 2>&1 | grep -v "is unchanged"
+             rm -rf autom4te.cache >/dev/null 2>&1
+             ;;
+         libtool )
+             libtoolize_version=`devtool_require libtoolize --version 4 "$1" "$2"`
+             echo "generating (GNU Libtool $libtoolize_version): ltmain.sh, libtool.m4, config.guess, config.sub"
+             libtoolize --force --copy >/dev/null 2>&1
+             cp `libtoolize --force --copy --dry-run | grep "add the contents of" |\
+                 sed -e 's;^[^\`]*\`;;' -e "s;'.*;;"` libtool.m4
+             ;;
+         shtool )
+             shtoolize_version=`devtool_require shtoolize -v 3 "$1" "$2"`
+             echo "generating (GNU Shtool $shtoolize_version): shtool"
+             shift
+             shift
+             shtoolize -q "$@"
+             ;;
+     esac
+ }
+ 
+ devtool_autoclean () {
+     tool=$1
+     shift
+     case $tool in
+         autoconf )
+             echo "removing: configure config.h.in"
+             rm -f configure config.h.in
+             ;;
+         libtool )
+             echo "removing: ltmain.sh libtool.m4 config.guess config.sub"
+             rm -f ltmain.sh libtool.m4 config.guess config.sub
+             ;;
+         shtool )
+             echo "removing: shtool"
+             rm -f shtool
+             ;;
+     esac
+ }
+ 


ossp-pkg/svs/svs.pod -> 1.1

*** /dev/null    Sat Apr 20 01:22:06 2024
--- -    Sat Apr 20 01:22:09 2024
***************
*** 0 ****
--- 1,131 ----
+ ##
+ ##  OSSP svs -- Stupid/Silly/Simple Versioning System
+ ##  Copyright (c) 2003-2004 Ralf S. Engelschall <rse@engelschall.com>
+ ##  Copyright (c) 2003-2004 The OSSP Project <http://www.ossp.org/>
+ ##
+ ##  This file is part of OSSP svs, a stupid/silly/simple versioning
+ ##  system which can found at http://www.ossp.org/pkg/tool/svs/
+ ##
+ ##  Permission to use, copy, modify, and distribute this software for
+ ##  any purpose with or without fee is hereby granted, provided that
+ ##  the above copyright notice and this permission notice appear in all
+ ##  copies.
+ ##
+ ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ ##  SUCH DAMAGE.
+ ##
+ ##  svs.pod: manual page (language: POD)
+ ##
+ 
+ =pod
+ 
+ =head1 NAME
+ 
+ B<svs> - B<Stupid/Silly/Simple Versioning System>
+ 
+ =head1 VERSION
+ 
+ B<OSSP svs> SVS_VERSION_STR
+ 
+ =head1 SYNOPSIS
+ 
+ =over 0
+ 
+ =item B<svs> vi I<file> [...]
+ 
+ =item B<svs> diff I<file>|I<dir> [...]
+ 
+ =item B<svs> backout I<file>|I<dir> [...]
+ 
+ =back
+ 
+ =head1 DESCRIPTION
+ 
+ B<OSSP svs> is a simple frontend to diff(1) and patch(1). It provides a
+ convenient way for working with changes on textual files if no history
+ tracking and version control is necessary. This is especially the
+ case when having to patch pristine vendor sources for portability or
+ bugfixing reasons.
+ 
+ B<svs> solves the following primary issues:
+ 
+ =over 4
+ 
+ =item Writable and preserved files
+ 
+ It is often the case that one enters the editor for editing a file, just
+ to have to recognized that it is not writable ("C<chmod u+w >I<file>)
+ or the original content was not (or not correctly) preserved before
+ ("C<cp> I<file> I<file>C<.orig>"). Simply running "C<svs vi>" instead
+ of "C<vi>" and not having to remember those subtle problems is both
+ convenient and leads to consistent results.
+ 
+ =item Re-editing of files
+ 
+ Usually the patching of vendor sources is an iterative process where one
+ has to both re-edit files and even perform the whole edit/diff/patch
+ cycle multiple times. Here it is important that no already applied
+ changes are lost (overwritten C<*.orig> files, etc) and that the changes
+ can be correctly backed out again.
+ 
+ =item Index style
+ 
+ For portability and consistency reasons it is good if all patches use
+ the same style. This means that all hunks should be preceeded by an
+ C<Index> header and that the change is represented with the concise
+ I<unified diff> format with at least 3 lines of context.
+ 
+ =item New or removed files
+ 
+ While patch files for changed vendor files are harmless, added or
+ removed vendor files are special cases both for the patch application
+ and removal. B<svs diff> and C<svs backout> correctly handle those
+ special cases.
+ 
+ =back
+ 
+ =head2 COMMANDS
+ 
+ The following commands are provided:
+ 
+ =over 4
+ 
+ =item B<svs> vi I<file> [...]
+ 
+ This potentially edits I<file> by preserving the original contents in
+ I<file>C<.orig> (if still not existing) and running the C<$EDITOR> (or
+ "C<vi>") on I<file>. On leaving the editor, the original and current
+ contents is compared. If there is no difference the I<file>C<.orig> is
+ removed again, else it is kept.
+ 
+ =item B<svs> diff [I<file>|I<dir> [...]]
+ 
+ This generates a "patch file" summarizing all changes made to files
+ where an I<file>C<.orig> exists.
+ 
+ =item B<svs> backout [I<file>|I<dir> [...]]
+ 
+ This backouts all changes made to files where an I<file>C<.orig> exists.
+ The I<file>C<.orig> files are removed, too.
+ 
+ =back
+ 
+ =head1 HISTORY
+ 
+ The B<svs> tool was implemented in 2003 by Ralf S. Engelschall
+ E<lt>rse@engelschall.comE<gt>. It was prompted by the need for a
+ frontend to diff(1) and patch(1) to generate patches in the B<OpenPKG>
+ E<lt>http://www.openpkg.org/E<gt> project.
+ 
+ =cut
+ 


ossp-pkg/svs/svs.sh -> 1.1

*** /dev/null    Sat Apr 20 01:22:06 2024
--- -    Sat Apr 20 01:22:09 2024
***************
*** 0 ****
--- 1,181 ----
+ #!/bin/sh
+ ##
+ ##  OSSP svs -- Stupid/Silly/Simple Versioning System
+ ##  Copyright (c) 2003-2004 Ralf S. Engelschall <rse@engelschall.com>
+ ##  Copyright (c) 2003-2004 The OSSP Project <http://www.ossp.org/>
+ ##
+ ##  This file is part of OSSP svs, a stupid/silly/simple versioning
+ ##  system which can found at http://www.ossp.org/pkg/tool/svs/
+ ##
+ ##  Permission to use, copy, modify, and distribute this software for
+ ##  any purpose with or without fee is hereby granted, provided that
+ ##  the above copyright notice and this permission notice appear in all
+ ##  copies.
+ ##
+ ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ ##  SUCH DAMAGE.
+ ##
+ ##  svs.sh: program (language: Bourne Shell)
+ ##
+ 
+ #   check command line
+ if [ $# -eq 0 ]; then
+     echo "Usage: svs vi <file> [...]"
+     echo "Usage: svs diff [<file>|<dir> [...]]"
+     echo "Usage: svs backout [<file>|<dir> [...]]"
+     exit 1
+ fi
+ 
+ #   dispatch into commands
+ cmd="$1"
+ shift
+ case "$cmd" in
+     v|vi|vim | e|em|ema|emac|emacs )
+         ##
+         ##  EDIT ONE OR MORE FILES
+         ##
+ 
+         #   iterate over all files
+         for file in "$@"; do
+             #   preserve original file
+             if [ ! -f $file.orig ]; then
+                 cp -p $file $file.orig
+                 orig=new
+             else
+                 orig=old
+             fi
+ 
+             #   edit file
+             chmod u+w $file
+             ${EDITOR-vi} $file
+ 
+             #   check for editing results
+             if cmp $file.orig $file >/dev/null 2>&1; then
+                 if [ ".$orig" = .new ]; then
+                     echo "svs: no changes made (keeping original)"
+                 else
+                     echo "svs: changes reversed (restoring original)"
+                 fi
+                 cp -p $file.orig $file
+                 rm -f $file.orig
+             else
+                 echo "svs: changes made (preserving original)"
+             fi
+         done
+         ;;
+ 
+     d|di|dif|diff )
+         ##
+         ##  GENERATE PATCHING DIFFERENCE
+         ##
+ 
+         #   determine file list
+         if [ $# -eq 0 ]; then
+             set -- .
+         fi
+         files=""
+         for file in "$@"; do
+             if [ -d $file ]; then
+                 for f in `find $file -type f -name "*.orig" -print`; do
+                     files="$files $f"
+                 done
+             elif [ -f $file ]; then
+                 files="$files $file"
+             else
+                 echo "svs:ERROR: \"$file\" neither regular file nor directory" 1>&2
+                 exit 1
+             fi
+         done
+ 
+         #   generate patch
+         for file in $files; do
+             file=`echo "$file" | sed -e 's;^\./;;' -e 's;/\./;/;g' -e 's;\([^/][^/]*\)/\.\.;;g' -e 's;//*;/;g'`
+             orig=`echo "$file" | sed -e 's;\.orig$;;' -e 's;$;.orig;'`
+             edit=`echo "$file" | sed -e 's;\.orig$;;'`
+             if [ ! -f $orig ]; then
+                 echo "svs:WARNING: original file \"$orig\" not found" 1>&2
+                 continue
+             fi
+             if [ ! -f $edit ]; then
+                 #   special case: removed file
+                 echo "Index: $edit"
+                 diff -u3 $orig /dev/null | sed -e "1s/^--- $orig/--- $edit/"
+             elif [ ! -r $orig ] && [ ! -s $orig ]; then
+                 #   special case: new file
+                 echo "Index: $edit"
+                 diff -u3 /dev/null $edit
+             else
+                 #   regular case: edited file
+                 if ! cmp $orig $edit >/dev/null 2>&1; then
+                     echo "Index: $edit"
+                     diff -u3 $orig $edit
+                 fi
+             fi
+         done
+         ;;
+ 
+     b|ba|bac|back|backo|backou|backout )
+         ##
+         ##  BACKOUT EDITING CHANGES
+         ##
+ 
+         #   determine file list
+         if [ $# -eq 0 ]; then
+             set -- .
+         fi
+         files=""
+         for file in "$@"; do
+             if [ -d $file ]; then
+                 for f in `find $file -type f -name "*.orig" -print`; do
+                     files="$files $f"
+                 done
+             elif [ -f $file ]; then
+                 files="$files $file"
+             else
+                 echo "svs:ERROR: \"$file\" neither regular file nor directory" 1>&2
+                 exit 1
+             fi
+         done
+ 
+         #   backout changes
+         for file in $files; do
+             file=`echo "$file" | sed -e 's;^\./;;' -e 's;/\./;/;g' -e 's;\([^/][^/]*\)/\.\.;;g' -e 's;//*;/;g'`
+             orig=`echo "$file" | sed -e 's;\.orig$;;' -e 's;$;.orig;'`
+             edit=`echo "$file" | sed -e 's;\.orig$;;'`
+             if [ ! -f $orig ]; then
+                 echo "svs:WARNING: original file \"$orig\" not found" 1>&2
+                 continue
+             fi
+             echo "svs: backing out changes to \"$edit\""
+             if [ ! -f $edit ]; then
+                 #   special case: removed file
+                 cp -p $orig $edit
+                 rm -f $orig
+             elif [ ! -r $orig ] && [ ! -s $orig ]; then
+                 #   special case: new file
+                 chmod u+w $orig
+                 rm -f $orig
+                 rm -f $edit
+             else
+                 #   regular case: edited file
+                 cp -p $orig $edit
+                 rm -f $orig
+             fi
+         done
+         ;;
+     * )
+         echo "svs:ERROR: invalid command \"$cmd\"" 1>&2
+         exit 1
+         ;;
+ esac
+ 

CVSTrac 2.0.1