Last change
on this file since 28994 was 28994, checked in by ak19, 10 years ago |
Committing local change (helpful comment) that existed in the GTI on puka
|
-
Property svn:executable
set to
*
|
File size:
959 bytes
|
Rev | Line | |
---|
[28490] | 1 | #! /bin/bash
|
---|
| 2 |
|
---|
| 3 | cp $1 $1.bak
|
---|
| 4 |
|
---|
| 5 | CLEANVERSION_NAME="$1.clean"
|
---|
| 6 |
|
---|
| 7 | # echo $1
|
---|
| 8 |
|
---|
| 9 | # Removing lines that will become completely empty after sed operation
|
---|
| 10 | # http://soft.zoneo.net/Linux/remove_empty_lines.php
|
---|
| 11 | # http://www.grymoire.com/Unix/Sed.html#uh-30
|
---|
| 12 | sed '/ *# -- Missing translation/d' $1 > $CLEANVERSION_NAME
|
---|
| 13 | mv $CLEANVERSION_NAME $1
|
---|
| 14 |
|
---|
| 15 | # Now we got rid of all the empty lines created by removing "Missing translation" lines
|
---|
| 16 | # We remove any lines containing "Missing translation" but also containing other stuff
|
---|
| 17 |
|
---|
| 18 | cat $1 | sed -e 's/# -- Missing translation:.*$//' > $CLEANVERSION_NAME
|
---|
| 19 |
|
---|
| 20 | # Remove comment of form: #Updated 21-Nov-2011 by <name>
|
---|
| 21 | #cat $CLEANVERSION_NAME | sed -e 's/# Updated \d\d-[a-zA-Z]{3}-\d{4} by.*$//' > $1
|
---|
| 22 | #cat $CLEANVERSION_NAME | sed -e 's/ *# Updated .* (by.*)?$//' > $1
|
---|
| 23 | cat $CLEANVERSION_NAME | sed -e 's/ *# Updated .[0-9]*\-...\-.....*$//' > $1
|
---|
| 24 |
|
---|
| 25 | rm $CLEANVERSION_NAME
|
---|
| 26 |
|
---|
| 27 | echo "**** cleaned version $1"
|
---|
| 28 | echo "**** pre-cleaned original is in $1.bak" |
---|
Note:
See
TracBrowser
for help on using the repository browser.