-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
643 changed files
with
9,356 additions
and
26,133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
# Use this script to remove duplicate lines from default language files in tech trees, | ||
# e.g. megapack_default.lng. Basically script is usefull only (once) with freshly produced | ||
# default lng (--translate-techtrees=x). | ||
# | ||
# How to use: Execute this script with one parameter, which should be an absolute path | ||
# to default lng file. | ||
# ---------------------------------------------------------------------------- | ||
# 2016 Written by filux <heross(@@)o2.pl> | ||
# Copyright (c) 2016 under GNU GPL v3.0+ | ||
LANG=C | ||
|
||
CURRENTDIR="$(dirname "$(readlink -f "$0")")" | ||
cd "$CURRENTDIR" | ||
|
||
awk -i inplace '!/^UnitTypeName_/ {print;next};{print;print}' "$1"; sleep 0.5s | ||
sed -z -i -e 's/\n/|||/g' "$1"; sleep 0.5s | ||
sed -i -e 's/; Unit|||UnitTypeName_[^=]*=/; Unit > /g' "$1"; sleep 0.5s | ||
sed -z -i -e 's/|||/\n/g' "$1"; sleep 0.5s | ||
awk -i inplace '/^; / { print; next; }; !a[$0]++' "$1"; sleep 0.5s | ||
sed -z -i -e 's/\n/|||/g' "$1"; sleep 0.5s | ||
sed -i -e 's/; Levels for this Unit|||; -*|||//g' -e 's/; Types of Commands for this Unit|||; -/; -/g' \ | ||
-e 's/; Levels for this Unit|||//g' -e 's/; Types of Commands for this Unit|||//g' \ | ||
-e 's/; Unit > [^|]*|||UnitTypeName_/UnitTypeName_/g' -e 's/; -*|||; -/; -/g' \ | ||
-e 's/; Unit > [^|]*|||; -------------------------------------|||//g' \ | ||
-e 's/; Unit > [^|]*|||; --------------------------------------*/; -----------------------------------------------------------------------------/g' \ | ||
-e 's/; -*|||; -/; -/g' "$1"; sleep 0.5s | ||
sed -z -i -e 's/|||/\n/g' "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.