1.1 --- a/tools/checkconfig.sh Mon May 29 21:18:33 2023 +0200
1.2 +++ b/tools/checkconfig.sh Wed May 31 16:41:49 2023 +0200
1.3 @@ -1,8 +1,28 @@
1.4 #!/bin/sh
1.5
1.6 -THISDIR=`dirname "$0"`
1.7 -DIRNAME=`readlink -f "$THISDIR/.."`
1.8 -PROGNAME=`basename "$0"`
1.9 +# Customise the configuration of the software for a particular target
1.10 +# platform.
1.11 +#
1.12 +# Copyright (C) 2018, 2023 Paul Boddie <paul@boddie.org.uk>
1.13 +#
1.14 +# This program is free software; you can redistribute it and/or
1.15 +# modify it under the terms of the GNU General Public License as
1.16 +# published by the Free Software Foundation; either version 2 of
1.17 +# the License, or (at your option) any later version.
1.18 +#
1.19 +# This program is distributed in the hope that it will be useful,
1.20 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
1.21 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.22 +# GNU General Public License for more details.
1.23 +#
1.24 +# You should have received a copy of the GNU General Public License
1.25 +# along with this program; if not, write to the Free Software
1.26 +# Foundation, Inc., 51 Franklin Street, Fifth Floor,
1.27 +# Boston, MA 02110-1301, USA
1.28 +
1.29 +THISDIR=$(dirname "$0")
1.30 +DIRNAME=$(readlink -f "$THISDIR/..")
1.31 +PROGNAME=$(basename "$0")
1.32
1.33 if [ "$1" = '--help' ] || [ ! "$1" ] ; then
1.34 cat 1>&2 <<EOF
1.35 @@ -48,7 +68,7 @@
1.36
1.37 # Set the platform and the installation as target.
1.38
1.39 - PLATFORM=`grep -e 'CONFIG_PLATFORM_TYPE=' "$FILENAME" | sed 's/^.*"\(.*\)".*$/\1/'`
1.40 + PLATFORM=$(grep -e 'CONFIG_PLATFORM_TYPE=' "$FILENAME" | sed 's/^.*=//;s/"//g')
1.41 TARGETDIR="$1"
1.42 break
1.43 else
1.44 @@ -113,3 +133,5 @@
1.45 # Write it to the configuration file.
1.46
1.47 echo -n "$KEYPADLIB" > "$KEYPADCONF"
1.48 +
1.49 +# vim: tabstop=4 expandtab shiftwidth=4