mirror of
https://github.com/jtesta/ssh-audit.git
synced 2025-06-23 11:04:31 +02:00
Fixed most warnings from Shellcheck scans. (#197)
This commit is contained in:
@ -34,10 +34,10 @@
|
||||
PLATFORM="$(uname -s)"
|
||||
|
||||
# This script is intended for use on Cygwin only.
|
||||
case "$PLATFORM" in
|
||||
case "${PLATFORM}" in
|
||||
CYGWIN*) ;;
|
||||
*)
|
||||
echo "Platform not supported ($PLATFORM). This must be run in Cygwin only."
|
||||
echo "Platform not supported (${PLATFORM}). This must be run in Cygwin only."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@ -78,13 +78,14 @@ git checkout src/ssh_audit/globals.py 2> /dev/null
|
||||
|
||||
# Update the man page.
|
||||
./update_windows_man_page.sh
|
||||
if [[ $? != 0 ]]; then
|
||||
retval=$?
|
||||
if [[ ${retval} != 0 ]]; then
|
||||
echo "Failed to run ./update_windows_man_page.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Do all operations from this point from the main source directory.
|
||||
pushd src/ssh_audit > /dev/null
|
||||
pushd src/ssh_audit || exit > /dev/null
|
||||
|
||||
# Delete the existing VERSION variable and add the value that the user entered, above.
|
||||
sed -i '/^VERSION/d' globals.py
|
||||
@ -109,8 +110,9 @@ else
|
||||
fi
|
||||
|
||||
# Ensure that the version string doesn't have '-dev' in it.
|
||||
X=`dist/ssh-audit.exe | grep -E 'ssh-audit.exe v.+\-dev'` > /dev/null
|
||||
if [[ $? == 0 ]]; then
|
||||
dist/ssh-audit.exe | grep -E 'ssh-audit.exe v.+\-dev' > /dev/null
|
||||
retval=$?
|
||||
if [[ ${retval} == 0 ]]; then
|
||||
echo -e "\nError: executable's version number includes '-dev'."
|
||||
exit 1
|
||||
fi
|
||||
@ -121,5 +123,5 @@ rm -rf build/ ssh-audit.spec ssh-audit.py
|
||||
# Reset the changes we made to globals.py.
|
||||
git checkout globals.py 2> /dev/null
|
||||
|
||||
popd > /dev/null
|
||||
popd || exit > /dev/null
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user