diff --git a/instfiles/pam.d/mkpamrules b/instfiles/pam.d/mkpamrules index a75bfc32..989a52f4 100755 --- a/instfiles/pam.d/mkpamrules +++ b/instfiles/pam.d/mkpamrules @@ -22,8 +22,8 @@ find_pam_module_dir() # Looks for the pam security module directory set -- $pam_module_dir_searchpath for d in "$@"; do - if [ -s $d/pam_unix.so ]; then - echo $d + if [ -s "$d/pam_unix.so" ]; then + echo "$d" break fi done @@ -34,7 +34,7 @@ can_apply_unix_config() result=0 module_dir="$1" for m in $unix_modules_needed; do - if [ ! -s $module_dir/$m ]; then + if [ ! -s "$module_dir/$m" ]; then echo " ** $m not found" >&2 result=1 fi diff --git a/scripts/install_astyle.sh b/scripts/install_astyle.sh index 2ce3d52f..8601e51f 100755 --- a/scripts/install_astyle.sh +++ b/scripts/install_astyle.sh @@ -34,12 +34,12 @@ call_make() status=1 log=`mktemp /tmp/astyle-log.XXXXXXXXXX` if [ -n "$log" ]; then - make "$@" >$log 2>&1 + make "$@" >"$log" 2>&1 status=$? if [ $status -ne 0 ]; then - cat $log >&2 + cat "$log" >&2 fi - rm $log + rm "$log" fi # Re-enable `set -e` if active before @@ -80,27 +80,27 @@ fi # Put everything in this directory FILESDIR=$INSTALL_ROOT/$ASTYLE_VER - svn checkout ${REPO_URL}/${ASTYLE_VER}/AStyle $workdir + svn checkout ${REPO_URL}/${ASTYLE_VER}/AStyle "$workdir" - cd $workdir + cd "$workdir" make_args="DESTDIR=$FILESDIR" - + echo "Creating Makefiles..." cmake . - + echo "Making astyle..." call_make $make_args echo "Installing astyle..." - mkdir -p $FILESDIR + mkdir -p "$FILESDIR" call_make install $make_args # make install DESTDIR=~/astyle.local/3.1 ) status=$? if [ $status -eq 0 ]; then - rm -rf $workdir + rm -rf "$workdir" else "** Script failed. Work dir is $workdir" >&2 fi diff --git a/scripts/install_astyle_dependencies_with_apt.sh b/scripts/install_astyle_dependencies_with_apt.sh index 08533a02..e2ef229d 100755 --- a/scripts/install_astyle_dependencies_with_apt.sh +++ b/scripts/install_astyle_dependencies_with_apt.sh @@ -2,6 +2,6 @@ set -eufx PACKAGES="subversion cmake" - + apt-get update apt-get -yq --no-install-suggests --no-install-recommends install $PACKAGES diff --git a/scripts/install_cppcheck.sh b/scripts/install_cppcheck.sh index 8aa34790..db4f3880 100755 --- a/scripts/install_cppcheck.sh +++ b/scripts/install_cppcheck.sh @@ -34,12 +34,12 @@ call_make() status=1 log=`mktemp /tmp/cppcheck-log.XXXXXXXXXX` if [ -n "$log" ]; then - make "$@" >$log 2>&1 + make "$@" >"$log" 2>&1 status=$? if [ $status -ne 0 ]; then - cat $log >&2 + cat "$log" >&2 fi - rm $log + rm "$log" fi # Re-enable `set -e` if active before @@ -119,9 +119,9 @@ fi # See https://stackoverflow.com/questions/ # 791959/download-a-specific-tag-with-git - git clone -b $CPPCHECK_VER --depth 1 $REPO_URL $workdir + git clone -b "$CPPCHECK_VER" --depth 1 "$REPO_URL" "$workdir" - cd $workdir + cd "$workdir" case "$CPPCHECK_VER" in 1.*) @@ -145,13 +145,13 @@ fi call_make $make_args echo "Installing cppcheck..." - mkdir -p $FILESDIR + mkdir -p "$FILESDIR" call_make install $make_args ) status=$? if [ $status -eq 0 ]; then - rm -rf $workdir + rm -rf "$workdir" else "** Script failed. Work dir is $workdir" >&2 fi diff --git a/scripts/install_cppcheck_dependencies_with_apt.sh b/scripts/install_cppcheck_dependencies_with_apt.sh index f3f66764..610fb0ed 100755 --- a/scripts/install_cppcheck_dependencies_with_apt.sh +++ b/scripts/install_cppcheck_dependencies_with_apt.sh @@ -2,6 +2,6 @@ set -eufx PACKAGES="libz3-dev z3" - + apt-get update apt-get -yq --no-install-suggests --no-install-recommends install $PACKAGES diff --git a/scripts/install_xrdp_build_dependencies_with_apt.sh b/scripts/install_xrdp_build_dependencies_with_apt.sh index e460f612..ec35c8f5 100755 --- a/scripts/install_xrdp_build_dependencies_with_apt.sh +++ b/scripts/install_xrdp_build_dependencies_with_apt.sh @@ -70,7 +70,7 @@ in libx11-dev \ libxrandr-dev \ libxfixes-dev" - + case "$FEATURE_SET" in min) @@ -112,7 +112,7 @@ in libxrandr-dev:i386 \ libxrender-dev:i386 \ libfuse-dev:i386" - + dpkg --add-architecture i386 dpkg --print-architecture dpkg --print-foreign-architectures diff --git a/scripts/run_astyle.sh b/scripts/run_astyle.sh index abe45168..8b82182c 100755 --- a/scripts/run_astyle.sh +++ b/scripts/run_astyle.sh @@ -69,6 +69,6 @@ ASTYLE_FLAGS="--options=astyle_config.as ./\*.c ./\*.h" # Display the astyle version and command for debugging "$ASTYLE" --version && { - echo Command: $ASTYLE $ASTYLE_FLAGS + echo "Command: $ASTYLE $ASTYLE_FLAGS" "$ASTYLE" $ASTYLE_FLAGS } diff --git a/scripts/run_cppcheck.sh b/scripts/run_cppcheck.sh index 65ec254e..9e15b4a0 100755 --- a/scripts/run_cppcheck.sh +++ b/scripts/run_cppcheck.sh @@ -53,6 +53,6 @@ fi # Display the cppcheck version and command for debugging "$CPPCHECK" --version && { - echo Command: $CPPCHECK $CPPCHECK_FLAGS "$@" + echo "Command: $CPPCHECK $CPPCHECK_FLAGS" "$@" "$CPPCHECK" $CPPCHECK_FLAGS "$@" }