# HG changeset patch # User Paul Boddie # Date 1529332558 -7200 # Node ID 551e03d0550ef97d53ad021e43f004e4e51c8c3d # Parent 40d544f769170d8251c5b4ca8eab3ac3d5ea1a98 Added a quiet option for use by the installation script. Handle missing configuration files when installing into a distribution with an existing build directory. diff -r 40d544f76917 -r 551e03d0550e tools/checkconfig.sh --- a/tools/checkconfig.sh Fri Jun 01 23:36:17 2018 +0200 +++ b/tools/checkconfig.sh Mon Jun 18 16:35:58 2018 +0200 @@ -6,7 +6,7 @@ if [ "$1" = '--help' ] || [ ! "$1" ] ; then cat 1>&2 < | +Usage: $PROGNAME [-q] | Update platform-specific files for the indicated platform type. If a directory is specified instead, try and obtain a configured platform type and use that @@ -19,10 +19,20 @@ If a directory is specified instead, this program will update installed files, leaving the distribution alone. + +The -q option silences warnings about the build directory and is used by the +installation tool. EOF exit 1 fi +if [ "$1" = '-q' ] ; then + QUIET="$1" + shift 1 +else + QUIET= +fi + # Check for a build directory and obtain a platform type. if [ -e "$1" ] ; then @@ -42,13 +52,15 @@ TARGETDIR="$1" break else - cat 1>&2 <&2 < EOF + fi exit 1 fi done @@ -71,6 +83,13 @@ exit 1 fi +# Handle missing configuration files. This may happen when installing into an +# existing directory hierarchy with build products. + +if [ ! -e "$TARGETDIR/conf/landfall-examples" ] ; then + exit 0 +fi + # Panel configuration file in the target area. PANELCONF="$TARGETDIR/conf/landfall-examples/mips-jz4740-panel.txt"