fix some shellcheck warnings
This commit is contained in:
parent
0c942feaff
commit
59f8d9fe07
@ -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
|
||||
|
@ -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
|
||||
|
@ -2,6 +2,6 @@
|
||||
set -eufx
|
||||
|
||||
PACKAGES="subversion cmake"
|
||||
|
||||
|
||||
apt-get update
|
||||
apt-get -yq --no-install-suggests --no-install-recommends install $PACKAGES
|
||||
|
@ -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
|
||||
|
@ -2,6 +2,6 @@
|
||||
set -eufx
|
||||
|
||||
PACKAGES="libz3-dev z3"
|
||||
|
||||
|
||||
apt-get update
|
||||
apt-get -yq --no-install-suggests --no-install-recommends install $PACKAGES
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 "$@"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user