annotate tools/findchargen.sh @ 2547:71f04d8e791e

Implement a simple shell script for finding C64 chargen ROM image file (if any can be found) for *NIX builds and note the existence of the DM_DEF_CHARGEN define in MinGW Makefile with an example.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 18 Oct 2021 16:58:02 +0300
parents
children a09e7202f763
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2547
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 #!/bin/sh
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 ###
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 ### Simple script to find C64 chargen ROM image file
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 ###
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 IFOUND=""
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 for IROOT in /usr /usr/local /opt; do
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 for IBASE in /lib /lib64 /share; do
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 IPATH="${IROOT}/${IBASE}/vice/C64/chargen"
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 if test -e "$IPATH"; then
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 IFOUND="$IPATH"
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 fi
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 done
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 done
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 # Echo the define if found
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 if test -n "$IFOUND"; then
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 echo "-DDM_DEF_CHARGEN=\\\"${IFOUND}\\\""
71f04d8e791e Implement a simple shell script for finding C64 chargen ROM image file
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 fi