[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Patch to remove internationalization from the d-i templates



Hi,

The included patch removes all internationalized template strings from the
d-i installer disks. It's quite rough and should of course not be applied
unconditionally, but if you're really cramped for space, it could be very
useful to gain those extra few kilobytes -- at least, it was the thing that
pushed me under that one floppy :-)

/* Steinar */
-- 
Homepage: http://www.sesse.net/

Index: Makefile
===================================================================
RCS file: /cvs/debian-boot/debian-installer/build/Makefile,v
retrieving revision 1.198
diff -u -r1.198 Makefile
--- Makefile	22 Aug 2003 15:10:46 -0000	1.198
+++ Makefile	15 Sep 2003 17:11:25 -0000
@@ -499,6 +499,13 @@
 	rm -f $(TMP_FILE)
 	install -d $(TEMP)
 	install -d $(DEST)
+	#
+	# Remove all internationalization from the templates.
+	#
+	for FILE in $$(find $(TREE) -name "*.templates"); do \
+		perl -e 'my $$status = 0; while (<>) { if (/^[A-Z]/ || /^$$/) { if (/^Description-/) { $$status = 0; } else { $$status = 1; } } print if ($$status); }' < $$FILE > temp; \
+		mv temp $$FILE; \
+	done; \
 	if [ $(INITRD_FS) = ext2 ]; then \
 		genext2fs -d $(TREE) -b `expr $$(du -s $(TREE) | cut -f 1) + $$(expr $$(find $(TREE) | wc -l) \* 2)` $(TMP_FILE); \
 	elif [ $(INITRD_FS) = romfs ]; then \

Reply to: