From b52c016eba9926106c755c83bb56493e07ea817e Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 18 Mar 2023 02:33:48 +0200 Subject: [PATCH 9/9] installer_build.sh: Add error handling for failed mkdir See osdn #46611 Signed-off-by: Marko Lindqvist --- windows/installer_cross/installer_build.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/windows/installer_cross/installer_build.sh b/windows/installer_cross/installer_build.sh index d608ab5456..7a1f8fe841 100755 --- a/windows/installer_cross/installer_build.sh +++ b/windows/installer_cross/installer_build.sh @@ -1,4 +1,17 @@ #!/bin/bash +#/*********************************************************************** +# Freeciv - Copyright (C) 2017-2023 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +#***********************************************************************/ add_glib_env() { mkdir -p $2/share/glib-2.0/schemas && @@ -319,7 +332,10 @@ else fi fi - mkdir -p autotools/Output + if ! mkdir -p autotools/Output ; then + echo "Cannot create autotools/Output directory" >&2 + exit 1 + fi if ! makensis Freeciv-$SETUP-$VERREV-$GUI.nsi then echo "Creating installer failed!" >&2 -- 2.39.2