1#!/bin/sh 2 3# convert Unicodedata.txt to C Sourcecode (using xxd -i) 4 5cat >UnicodeData.h <<END 6/* Automatically generated file using generate_unicodedata.sh */ 7/* This file is part of wxMaxima. */ 8 9/* Copyright (C) 2020 wxMaxima Team (https://wxMaxima-developers.github.io/wxmaxima/) */ 10 11/* This program is free software; you can redistribute it and/or modify */ 12/* it under the terms of the GNU General Public License as published by */ 13/* the Free Software Foundation; either version 2 of the License, or */ 14/* (at your option) any later version. */ 15 16/* This program is distributed in the hope that it will be useful, */ 17/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 18/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 19/* GNU General Public License for more details. */ 20 21/* You should have received a copy of the GNU General Public License */ 22/* along with this program; if not, write to the Free Software */ 23/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 24 25/* The license of UnicodeData.txt can be found at: https://www.unicode.org/license.html */ 26 27END 28 29echo "Converting UnicodeData.txt to embeddable C code" 30cut -d ";" -f 1-2 <UnicodeData.txt | gzip -c -n >UnicodeData.txt.gz 31xxd -i "UnicodeData.txt.gz" >>UnicodeData.h 32rm -f UnicodeData.txt.gz 33 34