pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cvs2fossil: use getopts, don't fail on warnings



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%gatalith.at@localhost>
Pushed By:	wiz
Date:		Tue Jun 27 19:17:23 2023 +0200
Changeset:	7a6b2d0eebb8cd85b6a99f35a5f40f4e2d18b472

Modified Files:
	cvs2fossil/distinfo
	cvs2fossil/patches/patch-convert.sh

Log Message:
cvs2fossil: use getopts, don't fail on warnings

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=7a6b2d0eebb8cd85b6a99f35a5f40f4e2d18b472

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 cvs2fossil/distinfo                 |  2 +-
 cvs2fossil/patches/patch-convert.sh | 23 ++++++++++++++---------
 2 files changed, 15 insertions(+), 10 deletions(-)

diffs:
diff --git a/cvs2fossil/distinfo b/cvs2fossil/distinfo
index f5f5f2edf0..b2fbbb88f9 100644
--- a/cvs2fossil/distinfo
+++ b/cvs2fossil/distinfo
@@ -6,4 +6,4 @@ Size (cvs2fossil-20140502.tar.gz) = 1258545 bytes
 SHA1 (patch-01-import_main.c) = 6177f632e9a7213e9aff911e28ac04378102fae5
 SHA1 (patch-04-commit_main.c) = a7afef765fca714dfe672ab7207789d91cd839c8
 SHA1 (patch-common_common.h) = 625959ee61513df52696987c9fba2abb83c91262
-SHA1 (patch-convert.sh) = 6dcce41772d1ce9440d20094268c28e73d9cf022
+SHA1 (patch-convert.sh) = 2cb7abefb9888c5b99e85d18e135be7e53557bbb
diff --git a/cvs2fossil/patches/patch-convert.sh b/cvs2fossil/patches/patch-convert.sh
index 327ebd2dfa..f939a04b22 100644
--- a/cvs2fossil/patches/patch-convert.sh
+++ b/cvs2fossil/patches/patch-convert.sh
@@ -4,7 +4,7 @@ Adapt script for pkgsrc paths, make arguments available from command line.
 
 --- convert.sh.orig	2011-02-15 18:57:40.000000000 +0000
 +++ convert.sh
-@@ -1,18 +1,29 @@
+@@ -1,18 +1,34 @@
  #!/bin/sh
  
 -# Sample conversion script
@@ -13,15 +13,20 @@ Adapt script for pkgsrc paths, make arguments available from command line.
  
 -db=/home/joerg/repo/src-new
 -repo=/home/joerg/repo/netbsd/src
++USAGE="usage: $0 [-m] source-cvs-rsync-path target-path"
 +strip=""
-+if [ "$#" > 1 ] && [ "$1" = -m ]
-+then
-+	shift
-+	strip=-m
-+fi
++while getopts m f
++do
++    case $f in
++        m)      strip=-m;;
++        \?)     echo "$USAGE" >&2; exit 1;;
++    esac
++done
++shift $((OPTIND - 1))
++
 +if [ "$#" != 2 ]
 +then
-+	echo usage: $0 [-m] source-cvs-rsync-path target-path >&2
++	echo "$USAGE" >&2
 +	exit 1
 +fi
 +
@@ -39,7 +44,7 @@ Adapt script for pkgsrc paths, make arguments available from command line.
  oldest=$(echo 'SELECT datetime(r.date,"-1 second") FROM revision r ORDER BY r.date LIMIT 1;' | sqlite3 $db)
  
  #
-@@ -35,14 +46,25 @@ oldest=$(echo 'SELECT datetime(r.date,"-
+@@ -35,14 +51,25 @@ oldest=$(echo 'SELECT datetime(r.date,"-
  #  revision IN (SELECT revision.id FROM revision WHERE date > "1998-05-01");
  #EOF
  
@@ -64,7 +69,7 @@ Adapt script for pkgsrc paths, make arguments available from command line.
  #TMPDIR=. time sqlite3 $fossil 'pragma synchronous=off; pragma journal_mode=off; vacuum'
 +
 +echo Checking for possible problems
-+99-warnings $db
++99-warnings $db || true
 +echo End of warnings
 +
 +echo Checking for timewarp issues


Home | Main Index | Thread Index | Old Index