<URL: http://bugs.freeciv.org/Ticket/Display.html?id=36859 >

Hi.

 I made a script which perform automatically nation inclusion.
 The call is done as:
 ./add_nation ruleset_name flag_name "flag authors" [freeciv root]
 I've tested it on the Belarusian nation and it appears, that
 many files are not in alphabetical order, but the script was able to
 fix it.
 Known shortcoming: there is no way to add nations after Zulu,
 the last available nation. However, this problem is unlikely.

 See attachments for the script and patch, which reflects bugs in
 alphabetical ordering.

Thanks, Daniil.

Attachment: add_nation
Description: Binary data

Index: data/default/nations.ruleset
===================================================================
--- data/default/nations.ruleset	(revision 12694)
+++ data/default/nations.ruleset	(working copy)
@@ -71,6 +71,7 @@
 *include "nation/barbarian.ruleset"
 *include "nation/basque.ruleset"
 *include "nation/bavarian.ruleset"
+*include "nation/belarusian.ruleset"
 *include "nation/belgian.ruleset"
 *include "nation/bengali.ruleset"
 *include "nation/boer.ruleset"
@@ -162,8 +163,8 @@
 *include "nation/numidian.ruleset"
 *include "nation/nuu-chah-nulth.ruleset"
 *include "nation/ottoman.ruleset"
+*include "nation/pakistani.ruleset"
 *include "nation/papuan.ruleset"
-*include "nation/pakistani.ruleset"
 *include "nation/persian.ruleset"
 *include "nation/peruvian.ruleset"
 *include "nation/phoenician.ruleset"
Index: data/nation/Makefile.am
===================================================================
--- data/nation/Makefile.am	(revision 12694)
+++ data/nation/Makefile.am	(working copy)
@@ -25,6 +25,7 @@
 		barbarian.ruleset \
 		basque.ruleset \
 		bavarian.ruleset \
+		belarusian\.ruleset
 		belgian.ruleset \
 		bengali.ruleset \
 		boer.ruleset \
Index: data/misc/shields.spec
===================================================================
--- data/misc/shields.spec	(revision 12694)
+++ data/misc/shields.spec	(working copy)
@@ -32,6 +32,7 @@
 		"f.shield.bangladesh", "flags/bangladesh-shield"
 		"f.shield.barbarian", "flags/barbarian-shield"
 		"f.shield.bavarian", "flags/bavarian-shield"
+		"f.shield.belarus", "flags/belarus-shield"
 		"f.shield.belgium", "flags/belgium-shield"
 		"f.shield.boer", "flags/boer-shield"
 		"f.shield.bosnia", "flags/bosnia-shield"
@@ -64,8 +65,8 @@
 		"f.shield.europe", "flags/europe-shield"
 		"f.shield.euskadi", "flags/euskadi-shield"
 		"f.shield.finland", "flags/finland-shield"
+		"f.shield.france", "flags/france-shield"
 		"f.shield.france_old", "flags/france_old-shield"
-		"f.shield.france", "flags/france-shield"
 		"f.shield.galicia", "flags/galicia-shield"
 		"f.shield.gaul", "flags/gaul-shield"
 		"f.shield.georgia", "flags/georgia-shield"
@@ -89,8 +90,8 @@
 		"f.shield.innu", "flags/innu-shield"
 		"f.shield.iran_ancient", "flags/iran_ancient-shield"
 		"f.shield.iran", "flags/iran-shield"
+		"f.shield.iraq", "flags/iraq-shield"
 		"f.shield.iraq_old", "flags/iraq_old-shield"
-		"f.shield.iraq", "flags/iraq-shield"
 		"f.shield.ireland", "flags/ireland-shield"
 		"f.shield.iroquois", "flags/iroquois-shield"
 		"f.shield.israel", "flags/israel-shield"
@@ -124,10 +125,10 @@
 		"f.shield.netherlands", "flags/netherlands-shield"
 		"f.shield.newzealand", "flags/newzealand-shield"
 		"f.shield.nigeria", "flags/nigeria-shield"
+		"f.shield.norway", "flags/norway-shield"
 		"f.shield.nubia", "flags/nubia-shield"
 		"f.shield.numidia", "flags/numidia-shield"
 		"f.shield.nuu-chah-nulth", "flags/nuu-chah-nulth-shield"
-		"f.shield.norway", "flags/norway-shield"
 		"f.shield.ottoman", "flags/ottoman-shield"
 		"f.shield.pakistan", "flags/pakistan-shield"
 		"f.shield.palmyra", "flags/palmyra-shield"
@@ -172,10 +173,10 @@
 		"f.shield.tairona", "flags/tairona-shield"
 		"f.shield.taiwan", "flags/taiwan-shield"
 		"f.shield.texas", "flags/texas-shield"
+		"f.shield.thailand", "flags/thailand-shield"
+		"f.shield.thrace", "flags/thrace-shield"
 		"f.shield.tibet", "flags/tibet-shield"
 		"f.shield.tocharian", "flags/tocharian-shield"
-		"f.shield.thailand", "flags/thailand-shield"
-		"f.shield.thrace", "flags/thrace-shield"
 		"f.shield.tunisia", "flags/tunisia-shield"
 		"f.shield.tupi", "flags/tupi-shield"
 		"f.shield.turkey", "flags/turkey-shield"
Index: data/misc/flags.spec
===================================================================
--- data/misc/flags.spec	(revision 12694)
+++ data/misc/flags.spec	(working copy)
@@ -32,6 +32,7 @@
    Bangladesh		Cezary Biele
    Barbarian		Tobias Jakobs
    Bavarian		J├Ârgen Scheibengruber
+   Belarus		Gregory Maxwell and Zachary Harden
    Belgium		Daniel McRae
    Boer			Caleb Moore
    Bosnia		Daniel McRae
@@ -215,6 +216,7 @@
 		"f.bangladesh", "flags/bangladesh"
 		"f.barbarian", "flags/barbarian"
 		"f.bavarian", "flags/bavarian"
+		"f.belarus", "flags/belarus"
 		"f.belgium", "flags/belgium"
 		"f.boer", "flags/boer"			; old south african
 		"f.bosnia", "flags/bosnia"
@@ -247,8 +249,8 @@
 		"f.europe", "flags/europe"
 		"f.euskadi", "flags/euskadi"
 		"f.finland", "flags/finland"
+		"f.france", "flags/france"
 		"f.france_old", "flags/france_old"	; alt Gallic
-		"f.france", "flags/france"
 		"f.galicia", "flags/galicia"
 		"f.gaul", "flags/gaul"
 		"f.georgia", "flags/georgia"
@@ -266,14 +268,14 @@
 		"f.hungary", "flags/hungary"
 		"f.iceland", "flags/iceland"
 		"f.illyria", "flags/illyria"
+		"f.inca", "flags/inca"
 		"f.india", "flags/india"
-		"f.inca", "flags/inca"
 		"f.indonesia", "flags/indonesia"
 		"f.innu", "flags/innu"
 		"f.iran_ancient", "flags/iran_ancient"
 		"f.iran", "flags/iran"
+		"f.iraq", "flags/iraq"
 		"f.iraq_old", "flags/iraq_old"		; used by Babylonian
-		"f.iraq", "flags/iraq"
 		"f.ireland", "flags/ireland"
 		"f.iroquois", "flags/iroquois"
 		"f.israel", "flags/israel"
@@ -307,14 +309,14 @@
 		"f.netherlands", "flags/netherlands"
 		"f.newzealand", "flags/newzealand"
 		"f.nigeria", "flags/nigeria"
+		"f.norway", "flags/norway"
 		"f.nubia", "flags/nubia"
 		"f.numidia", "flags/numidia"
 		"f.nuu-chah-nulth", "flags/nuu-chah-nulth"
-		"f.norway", "flags/norway"
 		"f.ottoman", "flags/ottoman"
-		"f.papua_newguinea", "flags/papua_newguinea"
 		"f.pakistan", "flags/pakistan"
 		"f.palmyra", "flags/palmyra"
+		"f.papua_newguinea", "flags/papua_newguinea"
 		"f.peru", "flags/peru"
 		"f.philippines", "flags/philippines"
 		"f.phoenicia", "flags/phoenicia"
Index: data/flags/Makefile.am
===================================================================
--- data/flags/Makefile.am	(revision 12694)
+++ data/flags/Makefile.am	(working copy)
@@ -24,6 +24,7 @@
 		bangladesh.png		\
 		barbarian.png		\
 		bavarian.png		\
+		belarus.png		\
 		belgium.png		\
 		boer.png		\
 		bosnia.png		\
@@ -97,11 +98,11 @@
 		latvia.png		\
 		libya.png		\
 		lithuania.png		\
+		macedonia.png		\
 		madagascar.png		\
 		majapahit.png		\
 		malaysia.png		\
 		mali.png		\
-		macedonia.png		\
 		maori.png		\
 		mapuche.png		\
 		mars.png		\
@@ -200,10 +201,11 @@
 		aymara-shield.png		\
 		azerbaijan-shield.png		\
 		aztec-shield.png		\
+		babylon-shield.png		\
 		bangladesh-shield.png		\
 		barbarian-shield.png		\
 		bavarian-shield.png		\
-		babylon-shield.png		\
+		belarus-shield.png		\
 		belgium-shield.png		\
 		boer-shield.png			\
 		bosnia-shield.png		\
@@ -277,11 +279,11 @@
 		latvia-shield.png		\
 		libya-shield.png		\
 		lithuania-shield.png		\
+		macedonia-shield.png		\
 		madagascar-shield.png		\
 		majapahit-shield.png		\
 		malaysia-shield.png		\
 		mali-shield.png			\
-		macedonia-shield.png		\
 		maori-shield.png		\
 		mapuche-shield.png		\
 		mars-shield.png			\
@@ -365,9 +367,9 @@
 
 svg_files = 				\
 		aborigines.svg		\
+		afghanistan.svg		\
 		ainu.svg		\
 		akwe.svg		\
-		afghanistan.svg		\
 		algeria.svg		\
 		antarctica.svg		\
 		arab.svg		\
@@ -384,6 +386,7 @@
 		bangladesh.svg		\
 		barbarian.svg		\
 		bavarian.svg		\
+		belarus.svg		\
 		belgium.svg		\
 		boer.svg		\
 		bosnia.svg		\
Index: po/POTFILES.in
===================================================================
--- po/POTFILES.in	(revision 12694)
+++ po/POTFILES.in	(working copy)
@@ -239,9 +239,9 @@
 data/nation/antarctican.ruleset
 data/nation/arab.ruleset
 data/nation/aramean.ruleset
+data/nation/argentine.ruleset
 data/nation/armenian.ruleset
 data/nation/assyrian.ruleset
-data/nation/argentine.ruleset
 data/nation/australian.ruleset
 data/nation/austrian.ruleset
 data/nation/aymara.ruleset
@@ -250,6 +250,7 @@
 data/nation/barbarian.ruleset
 data/nation/basque.ruleset
 data/nation/bavarian.ruleset
+data/nation/belarusian.ruleset
 data/nation/belgian.ruleset
 data/nation/bengali.ruleset
 data/nation/boer.ruleset
@@ -365,8 +366,8 @@
 data/nation/silesian.ruleset
 data/nation/singaporean.ruleset
 data/nation/sioux.ruleset
+data/nation/slovakian.ruleset
 data/nation/slovenian.ruleset
-data/nation/slovakian.ruleset
 data/nation/southafrican.ruleset
 data/nation/soviet.ruleset
 data/nation/spanish.ruleset
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to