incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject svn commit: r1195318 - in /incubator/ooo/ooo-site/trunk/tools: dos2unix.pl kenai2website.sh
Date Mon, 31 Oct 2011 03:30:04 GMT
Author: wave
Date: Mon Oct 31 03:30:04 2011
New Revision: 1195318

URL: http://svn.apache.org/viewvc?rev=1195318&view=rev
Log:
update to kenai process that includes the dos2unix.pl which is necessary to assure svn add
of the project actually works.

Added:
    incubator/ooo/ooo-site/trunk/tools/dos2unix.pl   (with props)
Modified:
    incubator/ooo/ooo-site/trunk/tools/kenai2website.sh

Added: incubator/ooo/ooo-site/trunk/tools/dos2unix.pl
URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/tools/dos2unix.pl?rev=1195318&view=auto
==============================================================================
--- incubator/ooo/ooo-site/trunk/tools/dos2unix.pl (added)
+++ incubator/ooo/ooo-site/trunk/tools/dos2unix.pl Mon Oct 31 03:30:04 2011
@@ -0,0 +1,44 @@
+#! /usr/bin/perl
+
+# dos2unix.pl by David Efflandt <efflandt@xnet.com>
+# Modification of script from "Learning perl" p.353
+# O'Reilly & Associates, Inc.
+#
+# Run after transfering text files from DOS to UNIX system.
+# Strips carriage returns from DOS files for use UNIX.
+# Transfers file permissions to new file (except suid bit).
+#
+#       Usage:\tdos2unix.pl FILELIST
+#       where FILELIST = one or more filenames
+#
+# If you edit this file in DOS you can run it on itself by typing:
+#       perl dos2unix.pl dos2unix.pl
+#
+# Modify variables below for other search and replace functions.
+
+$find = "\r";   # find this
+$sub = "";   # substitute with this
+$rm_bak = 1;    # remove old file after conversion: 0 = no, 1 = yes
+
+while (<>) {
+    if ($ARGV ne $oldargv) {
+	($dev,$ino,$mode,$nlink,$uid,$gid) = stat($ARGV);
+	$backup = $ARGV . '.bak';
+	rename($ARGV, $backup);
+	open (ARGVOUT, ">$ARGV");
+	chmod $mode, $ARGV;
+	select(ARGVOUT);
+	$oldargv = $ARGV;
+    }
+    s/$find/$sub/g;
+    s/\t/  /g;
+        s/
+	    /\n/g;
+} continue {
+    print;
+    if (eof) {
+	print STDOUT "Converted: $oldargv\n";
+	unlink $backup if $rm_bak;
+    }
+}
+select(STDOUT);

Propchange: incubator/ooo/ooo-site/trunk/tools/dos2unix.pl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/ooo/ooo-site/trunk/tools/dos2unix.pl
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/ooo/ooo-site/trunk/tools/kenai2website.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/ooo-site/trunk/tools/kenai2website.sh?rev=1195318&r1=1195317&r2=1195318&view=diff
==============================================================================
--- incubator/ooo/ooo-site/trunk/tools/kenai2website.sh (original)
+++ incubator/ooo/ooo-site/trunk/tools/kenai2website.sh Mon Oct 31 03:30:04 2011
@@ -49,8 +49,8 @@ fi
 
 REPOS='https://svn.openoffice.org/svn/'
 REPOS2='~webcontent'
-DOS2UNIX='/tmp/dos2unix.pl'
 toolsdir=`pwd`
+DOS2UNIX=${toolsdir}/dos2unix.pl
 contentdir=${toolsdir}/../content/
 
 webproject=$1



Mime
View raw message