svn commit: r17804 - trunk/tools/bin
Linus Tolke <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: linus
Date: 2010-01-11 13:58:42-0800
New Revision: 17804
Added:
trunk/tools/bin/fix-properties.sh (contents, props changed)
Modified:
trunk/tools/bin/add-epl-header.sh (contents, props changed)
Log:
Fixed the tools.
Modified: trunk/tools/bin/add-epl-header.sh
Url: http://argouml.tigris.org/source/browse/argouml/trunk/tools/bin/add-epl-header.sh?view=diff&pathrev=17804&r1=17803&r2=17804
==============================================================================
--- trunk/tools/bin/add-epl-header.sh (original)
+++ trunk/tools/bin/add-epl-header.sh 2010-01-11 13:58:42-0800
@@ -4,17 +4,18 @@
for dir in `find . -type d -print | grep -v /.svn`
do
(
+ echo Processing $dir:
cd $dir
for file in *.java
do
if head -1 $file | grep '^//'
then
- author=`svn info $file | egrep '^Last Changed Author:' | sed 's/^.*: //'`
+ author=`svn info -r {2010-01-01} $file | egrep '^Last Changed Author:' | sed 's/^.*: //'`
ed $file <<EOF
1d
1i
/* \$Id\$
- *******************************************************************************
+ *****************************************************************************
* Copyright (c) 2009 Contributors - see below
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -23,7 +24,7 @@
*
* Contributors:
* $author
- *******************************************************************************
+ *****************************************************************************
*
* Some portions of this file was previously release using the BSD License:
*/
@@ -32,22 +33,28 @@
w
q
EOF
- svn diff -x -w $file
- echo -n "Replace? N/Y/Q "
- read ans
- case "$ans" in
- Y)
- ;;
- Q)
- svn revert $file
- exit 0;
- ;;
- *)
- svn revert $file
- ;;
- esac
+ svn diff -x -w $file > svn-diff.tmp
+ if [ "X`wc -l < svn-diff.tmp`" != X24 ]
+ then
+ cat svn-diff.tmp
+ rm svn-diff.tmp
+ echo -n "Replace? N/Y/Q "
+ read ans
+ case "$ans" in
+ Y)
+ ;;
+ Q)
+ svn revert $file
+ exit 0;
+ ;;
+ *)
+ svn revert $file
+ ;;
+ esac
+ fi
fi
done
- svn ci -N -m'Added EPL License header.'
+ svn ci --depth files -m'Added EPL License header.'
+ echo Processing $dir...done.
)
done
Added: trunk/tools/bin/fix-properties.sh
Url: http://argouml.tigris.org/source/browse/argouml/trunk/tools/bin/fix-properties.sh?view=markup&pathrev=17804
==============================================================================
--- (empty file)
+++ trunk/tools/bin/fix-properties.sh 2010-01-11 13:58:42-0800
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+find . -type f \( -name \*.java -o -name \*.xml -o -name \*.txt \) -print |
+xargs -r svn propset svn:eol-style native
+
+find . -type f \( -name \*.java -o -name \*.xml -o -name \*.properties -o -name \*.txt -o -name \*.html \) -print |
+xargs -r svn propset svn:keywords 'Author Date Id Revision'
+
+find . -type f \( -name \*.java -o -name \*.xml -o -name \*.properties -o -name \*.txt \) -print |
+xargs -r svn propdel svn:executable
+
+# Scripts
+find . -type f -name \*.bat -print |
+xargs -r svn propset svn:eol-style 'CRLF'
+
+find . -type f -name \*.sh -print |
+xargs -r svn propset svn:eol-style 'LF'
+
+find . -type f \( -name \*.sh -o -name \*.bat \) -print |
+xargs -r svn propset svn:executable '*'
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2436461
To unsubscribe from this discussion, e-mail: [[email protected]].