From c0e3bd645817b7a28a1e805faa413a915ddf9e64 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 19 Mar 2022 11:03:39 +0200 Subject: [PATCH 46/46] Clear trailing spaces from shell scripts See osdn #44147 Signed-off-by: Marko Lindqvist --- autogen.sh | 36 +++++++++---------- scripts/setup_auth_server.sh | 2 +- scripts/spec_propagate.sh | 2 +- tests/va_list.sh | 2 +- .../create-freeciv-gtk-qt-nsi.sh | 6 ++-- .../create-freeciv-ruledit-nsi.sh | 2 +- .../create-freeciv-sdl2-nsi.sh | 6 ++-- .../create-freeciv-gtk-qt-nsi.sh | 6 ++-- .../create-freeciv-ruledit-nsi.sh | 2 +- .../create-freeciv-sdl2-nsi.sh | 6 ++-- 10 files changed, 35 insertions(+), 35 deletions(-) diff --git a/autogen.sh b/autogen.sh index 6b310c4c68..4532cdf04d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -17,14 +17,14 @@ FC_RUN_CONFIGURE=yes # Leave out NLS checks for NAME in $@ ; do - if [ "x$NAME" = "x--help" ]; then + if [ "x$NAME" = "x--help" ]; then FC_HELP=yes fi - if [ "x$NAME" = "x--disable-nls" ]; then + if [ "x$NAME" = "x--disable-nls" ]; then echo "! nls checks disabled" FC_USE_NLS=no fi - if [ "x$NAME" = "x--no-configure-run" ]; then + if [ "x$NAME" = "x--no-configure-run" ]; then FC_RUN_CONFIGURE=no fi FC_NEWARGLINE="$FC_NEWARGLINE $NAME" @@ -39,7 +39,7 @@ debug () } real_package_name () -# solve a real name of suitable package +# solve a real name of suitable package # first argument : package name (executable) # second argument : source download url # third-fifth argument : major, minor, micro version @@ -74,8 +74,8 @@ real_package_name () version_check $RPN_COMPLAIN $RPACKAGE $RPACKAGE $RURL $RMAJOR $RMINOR $RMICRO return 1 fi - else - # no version of given package with version information + else + # no version of given package with version information # in its name available version_check $RPN_COMPLAIN $RPACKAGE $RPACKAGE $RURL $RMAJOR $RMINOR $RMICRO return 1 @@ -86,7 +86,7 @@ real_package_name () } version_search () -# search the newest version of a package +# search the newest version of a package # first argument : package name (executable) { SPACKAGE=$1 @@ -94,14 +94,14 @@ version_search () IFS=":" set -- $PATH IFS=$STOREDIFS - + s_pkg_major=0 s_pkg_minor=0 new_pkg= - + for SEARCHDIR ; do for MATCHSTUFF in `ls "$SEARCHDIR/$SPACKAGE-"* 2> /dev/null` ; do - for FOUNDPKG in $MATCHSTUFF; do + for FOUNDPKG in $MATCHSTUFF; do # parse version information from name new_s_pkg_major=`echo $FOUNDPKG | cut -s -d- -f2 | cut -s -d. -f1` new_s_pkg_minor=`echo $FOUNDPKG | cut -s -d- -f2 | cut -s -d. -f2` @@ -114,7 +114,7 @@ version_search () [ "x`echo $new_s_pkg_minor | sed s/[0-9]*//g`" = "x" ] && \ CORRECT=1 - if [ ! -z $CORRECT ]; then + if [ ! -z $CORRECT ]; then if [ "$new_s_pkg_major" -gt "$s_pkg_major" ]; then s_pkg_major=$new_s_pkg_major s_pkg_minor=$new_s_pkg_minor @@ -130,7 +130,7 @@ version_search () done done done - + if [ -z "$new_pkg" ]; then return 1 else @@ -141,7 +141,7 @@ version_search () version_check () # check the version of a package # first argument : silent ('2'), complain ('1') or not ('0') -# second argument : package name +# second argument : package name # third argument : package name (executable) # fourth argument : source download url # rest of arguments : major, minor, micro version @@ -172,8 +172,8 @@ version_check () echo "+ checking for $PACKAGEMSG ... " | tr -d '\n' fi fi - - ($PACKAGE --version) < /dev/null > /dev/null 2>&1 || + + ($PACKAGE --version) < /dev/null > /dev/null 2>&1 || { if [ "$COMPLAIN" -eq "1" ]; then echo @@ -256,7 +256,7 @@ if [ "$FC_USE_NLS" = "yes" ]; then version_check 1 "xgettext" "xgettext" "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 15 || DIE2=1 version_check 1 "msgfmt" "msgfmt" "ftp://ftp.gnu.org/pub/gnu/gettext/" 0 15 || DIE2=1 if [ "$DIE2" -eq 1 ]; then - echo + echo echo "You may want to use --disable-nls to disable NLS." echo "This will also remove the dependency for xgettext and msgfmt." DIE=1 @@ -318,7 +318,7 @@ if [ "$FC_RUN_CONFIGURE" = "no" ]; then echo "Now type 'configure' to configure $package." exit 0 fi - + echo "+ running configure ... " echo if [ -z "$FC_NEWARGLINE" ]; then @@ -340,7 +340,7 @@ if [ "$FC_HELP" = "yes" ]; then exit 1 fi -echo +echo echo "Now type 'make' to compile $package." exit 0 diff --git a/scripts/setup_auth_server.sh b/scripts/setup_auth_server.sh index e4af63232f..dedc6f2ffa 100755 --- a/scripts/setup_auth_server.sh +++ b/scripts/setup_auth_server.sh @@ -16,7 +16,7 @@ # is much simpler and does not need this setup script.) # See doc/README.fcdb. # I know that this will not work with bare sh. Tested with bash, -# so I set it in use above. +# so I set it in use above. if command -v basename >/dev/null then diff --git a/scripts/spec_propagate.sh b/scripts/spec_propagate.sh index 0f233d1421..2db1e97905 100755 --- a/scripts/spec_propagate.sh +++ b/scripts/spec_propagate.sh @@ -25,7 +25,7 @@ patch_rulesetdir() { patch -d "$d" -p3 <"$P" || { case "$?" in 1) rej="$rej $d" ;; - *) + *) echo "*** patch was seriously unhappy with $d, giving up" return ;; diff --git a/tests/va_list.sh b/tests/va_list.sh index 8c10cfce6e..2408651d51 100755 --- a/tests/va_list.sh +++ b/tests/va_list.sh @@ -3,7 +3,7 @@ echo "# C or C++ files which use va_list but don't include stdarg.h:" find $1 -name "*.c" -o -name "*.cpp" \ | sort \ - | while read line; do + | while read line; do (grep "va_list" $line >/dev/null \ && ! grep "^#include.*" $line >/dev/null \ && echo "$line") diff --git a/windows/installer_cross/create-freeciv-gtk-qt-nsi.sh b/windows/installer_cross/create-freeciv-gtk-qt-nsi.sh index d3695f5331..00b5069bf9 100755 --- a/windows/installer_cross/create-freeciv-gtk-qt-nsi.sh +++ b/windows/installer_cross/create-freeciv-gtk-qt-nsi.sh @@ -69,8 +69,8 @@ Page custom DefaultLanguage DefaultLanguageLeave !insertmacro MUI_PAGE_DIRECTORY ;Start Menu Folder Page Configuration -!define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX" -!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\\\${APPNAME}\\\${VERSION}\\\${GUI_ID}" +!define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX" +!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\\\${APPNAME}\\\${VERSION}\\\${GUI_ID}" !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" !define MUI_STARTMENUPAGE_DEFAULTFOLDER "\$(^Name)" @@ -149,7 +149,7 @@ cat <