Update of /cvsroot/refdb/refdb/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13557/scripts
Modified Files:
Tag: Release_0_9_5_stable
refdb-bug.in
Log Message:
added option to protect passwords
Index: refdb-bug.in
===================================================================
RCS file: /cvsroot/refdb/refdb/scripts/refdb-bug.in,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -U2 -r1.2 -r1.2.2.1
--- refdb-bug.in 13 Dec 2002 20:33:55 -0000 1.2
+++ refdb-bug.in 23 Jul 2004 01:56:39 -0000 1.2.2.1
@@ -8,5 +8,6 @@
# deliberately to allow users to file a bug report without the foggiest
# notion of Unix concepts like redirection.
-outfile="refdb-bug.txt"
+outfile="refdb-bug.tmp"
+reportfile="refdb-bug.txt"
sysconfdir="<sysconfdir>"
REFDBLIB="<refdblib>"
@@ -103,8 +104,21 @@
cat $HOME/.bib2risrc | grep "^[^#]" >> $outfile 2>&1
echo ""
-echo "***********************************************************"
-echo "Output was written to ./$outfile"
-echo "Please append this file to all bug reports"
-echo "WARNING: ./$outfile might contain plain-text passwords"
-echo "***********************************************************"
+echo "************************************************************" >&2
+echo "WARNING: ./$reportfile might contain plain-text passwords" >&2
+echo "Do you want me to protect these passwords from prying eyes?" >&2
+echo "************************************************************" >&2
+echo -n "[Y/n]" >&2
+read STRIP
+
+if [ "$STRIP" = "n" ] || [ "$STRIP" = "N" ];then
+ mv $outfile $reportfile
+else
+# the square brackets contain a space and a tab
+ sed 's/^\(passwd[ ]*\).*/\1<protected>/' < $outfile > $reportfile && rm $outfile
+fi
+
+echo "************************************************************" >&2
+echo "Output was written to ./$reportfile" >&2
+echo "Please append this file to all bug reports" >&2
+echo "************************************************************" >&2
|