mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-24 07:16:52 -06:00
Fix additional issues detected by Sonarqube.
This commit is contained in:
parent
9c418188ee
commit
d7ad375232
@ -7,7 +7,6 @@ set -e
|
||||
trap 'ERRCODE=$? && if [ ${ERRCODE} -ne 0 ]; then echo "The command \"${BASH_COMMAND}\" failed in \"${FUNCNAME}\" with exit code ${ERRCODE}."; fi' EXIT
|
||||
|
||||
OS_VERSION=$(cat /etc/os-release | grep "^VERSION_ID=" | awk -F "=" '{ print $2 }' | sed 's/"//g')
|
||||
OS_NAME=$(cat /etc/os-release | grep "^ID=" | awk -F "=" '{ print $2 }' | sed 's/"//g')
|
||||
OS_ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)
|
||||
|
||||
# Stop creating pyc files.
|
||||
|
@ -12,7 +12,6 @@ _setup_env() {
|
||||
APP_REVISION=`grep "^APP_REVISION" web/config.py | cut -d"=" -f2 | sed 's/ //g'`
|
||||
APP_NAME=`grep "^APP_NAME" web/config.py | cut -d"=" -f2 | sed "s/'//g" | sed 's/^ //' | sed 's/ //g' | tr '[:upper:]' '[:lower:]'`
|
||||
APP_LONG_VERSION=${APP_RELEASE}.${APP_REVISION}
|
||||
APP_SHORT_VERSION=`echo ${APP_LONG_VERSION} | cut -d . -f1,2`
|
||||
APP_SUFFIX=`grep "^APP_SUFFIX" web/config.py | cut -d"=" -f2 | sed 's/ //g' | sed "s/'//g"`
|
||||
if [ ! -z ${APP_SUFFIX} ]; then
|
||||
APP_LONG_VERSION=${APP_LONG_VERSION}-${APP_SUFFIX}
|
||||
|
@ -121,7 +121,7 @@ if [ ${IS_DEBIAN} == 1 ]; then
|
||||
esac
|
||||
fi
|
||||
|
||||
APACHE_STATUS=`ps cax | grep ${APACHE}`
|
||||
ps cax | grep ${APACHE} > /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if [ ${AUTOMATED} == 1 ]; then
|
||||
RESPONSE=Y
|
||||
@ -131,7 +131,7 @@ if [ $? -eq 0 ]; then
|
||||
|
||||
case ${RESPONSE} in
|
||||
y|Y )
|
||||
systemctl restart ${APACHE}
|
||||
systemctl restart ${APACHE}
|
||||
if [ $? != 0 ]; then
|
||||
echo "Error restarting ${APACHE}. Please check the systemd logs"
|
||||
else
|
||||
|
@ -18,8 +18,6 @@ trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
|
||||
trap 'if [ $? -ne 0 ]; then echo "\"${last_command}\" command filed with exit code $?."; fi' EXIT
|
||||
|
||||
OS_VERSION=$(cat /etc/os-release | grep "^VERSION_ID=" | awk -F "=" '{ print $2 }' | sed 's/"//g')
|
||||
OS_NAME=$(cat /etc/os-release | grep "^ID=" | awk -F "=" '{ print $2 }' | sed 's/"//g')
|
||||
OS_ARCH=$(arch)
|
||||
|
||||
# Common Linux build functions
|
||||
source pkg/linux/build-functions.sh
|
||||
@ -108,4 +106,4 @@ _create_repo_rpm fedora
|
||||
# Get the results!
|
||||
#
|
||||
test -d "${DISTROOT}/" || mkdir -p "${DISTROOT}/"
|
||||
cp ${HOME}/rpmbuild/RPMS/noarch/${APP_NAME}-*-repo-${REPO_RPM_VERSION}-${REPO_RPM_BUILD}.noarch.rpm "${DISTROOT}/"
|
||||
cp ${HOME}/rpmbuild/RPMS/noarch/${APP_NAME}-*-repo-${REPO_RPM_VERSION}-${REPO_RPM_BUILD}.noarch.rpm "${DISTROOT}/"
|
||||
|
Loading…
Reference in New Issue
Block a user