summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>2011-12-26 03:04:57 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>2011-12-26 03:04:57 +0000
commit637213f3b6561e4500837873ab1bbcda4e65c71a (patch)
tree0113f57239e27cf00529ce0b5cf2015f336e920e
parentAdd support for PYTHON_UPDATER_IGNORE. (diff)
downloadpython-updater-637213f3b6561e4500837873ab1bbcda4e65c71a.tar.gz
python-updater-637213f3b6561e4500837873ab1bbcda4e65c71a.tar.bz2
python-updater-637213f3b6561e4500837873ab1bbcda4e65c71a.zip
Improve coding style.
-rwxr-xr-xpython-updater20
1 files changed, 10 insertions, 10 deletions
diff --git a/python-updater b/python-updater
index f53727e..ab66b3e 100755
--- a/python-updater
+++ b/python-updater
@@ -120,7 +120,7 @@ EOF_USAGE
# veinfo(verbosity, message)
# einfo message if VERBOSE is bigger than verbosity.
veinfo() {
- if [[ VERBOSE -ge ${1} ]]; then
+ if [[ "${VERBOSE}" -ge "${1}" ]]; then
shift
einfo "${@}"
fi
@@ -679,8 +679,8 @@ for contents_file in $(find ${PKG_DBDIR}/ -name CONTENTS | sort); do
fi
CATPKG="${CATEGORY}/${PN}"
- # Use exact version when --reinstall-identical-versions option is used or SLOT file does not exist.
- if [[ "${REINSTALL_IDENTICAL_VERSIONS}" -eq "0" && -n "${SLOT}" ]]; then
+ # Use exact version when --reinstall-identical-versions option is used or SLOT is unknown.
+ if [[ "${REINSTALL_IDENTICAL_VERSIONS}" -eq 0 && -n "${SLOT}" ]]; then
CATPKGVER="${CATPKG}:${SLOT}"
else
CATPKGVER="=${CATEGORY}/${PF}"
@@ -705,7 +705,7 @@ for contents_file in $(find ${PKG_DBDIR}/ -name CONTENTS | sort); do
fi
# Check if package is in PKGS_MANUAL.
- if [[ CHECK_MANUAL -ne 0 ]] && has "${CATPKG}" ${PKGS_MANUAL}; then
+ if [[ "${CHECK_MANUAL}" -ne 0 ]] && has "${CATPKG}" ${PKGS_MANUAL}; then
PKGS_TO_REMERGE+=" ${CATPKGVER}"
eindent
einfo "Adding to list: ${CATPKGVER}"
@@ -739,7 +739,7 @@ for contents_file in $(find ${PKG_DBDIR}/ -name CONTENTS | sort); do
continue
fi
- if [[ CHECK_PYTHON_ABIS -ne 0 ]]; then
+ if [[ "${CHECK_PYTHON_ABIS}" -ne 0 ]]; then
if [[ -n "${PYTHON_MULTIPLE_ABIS}" || -n "${SUPPORT_PYTHON_ABIS}" ]]; then
new_PYTHON_ABIS=""
PYTHON_RESTRICTED_ABIS="$(get_ebuild_variable "${CATEGORY}" "${PN}" "${SLOT}" PYTHON_RESTRICTED_ABIS)"
@@ -773,7 +773,7 @@ for contents_file in $(find ${PKG_DBDIR}/ -name CONTENTS | sort); do
fi
fi
- if [[ CHECK_STATIC_LINKING -ne 0 ]]; then
+ if [[ "${CHECK_STATIC_LINKING}" -ne 0 ]]; then
binaries="$(scanelf -qs +Py_Initialize < <(grep -E "^obj" "${contents_file}" | cut -d" " -f2 | grep -Ev "^/usr/lib(32|64)?/debug/") | sed "s/.* //")"
if [[ -n "${binaries}" ]]; then
PKGS_TO_REMERGE+=" ${CATPKGVER}"
@@ -802,7 +802,7 @@ for contents_file in $(find ${PKG_DBDIR}/ -name CONTENTS | sort); do
continue
fi
- if [[ CHECK_ECLASS_NEED_REBUILD -ne 0 ]]; then
+ if [[ "${CHECK_ECLASS_NEED_REBUILD}" -ne 0 ]]; then
get_vdb_variable PYTHON_NEED_REBUILD "${environment_file}"
if echo "${PYTHON_NEED_REBUILD}" | grep -qE "$(get_OLD_PYTHON_VERSIONS_REGEX)"; then
PKGS_TO_REMERGE+=" ${CATPKGVER}"
@@ -815,7 +815,7 @@ for contents_file in $(find ${PKG_DBDIR}/ -name CONTENTS | sort); do
fi
fi
- if [[ CHECK_PYLIBDIR -ne 0 ]]; then
+ if [[ "${CHECK_PYLIBDIR}" -ne 0 ]]; then
# Search for possible old Python dirs in CONTENTS
# /usr/include/python$old
# /usr/lib/python$old
@@ -832,7 +832,7 @@ for contents_file in $(find ${PKG_DBDIR}/ -name CONTENTS | sort); do
fi
fi
- if [[ CHECK_SHARED_LINKING -ne 0 ]]; then
+ if [[ "${CHECK_SHARED_LINKING}" -ne 0 ]]; then
binaries="$(scanelf -qF "%F %n" < <(grep -E "^obj" "${contents_file}" | cut -d" " -f2 | grep -Ev "^/usr/lib(32|64)?/debug/") | grep -E "( |,)$(get_OLD_PYTHON_SHARED_LIBRARIES_REGEX)(,|$)")"
if [[ -n "${binaries}" ]]; then
PKGS_TO_REMERGE+=" ${CATPKGVER}"
@@ -874,7 +874,7 @@ if [[ "${PMS_COMMAND[${PMS_INDEX}]}" == "emerge" ]] ; then
fi
# Only pretending?
-[[ PRETEND -eq 1 ]] && PMS_OPTIONS[${PMS_INDEX}]+=" ${PMS_PRETENDING_OPTIONS[${PMS_INDEX}]}"
+[[ "${PRETEND}" -eq 1 ]] && PMS_OPTIONS[${PMS_INDEX}]+=" ${PMS_PRETENDING_OPTIONS[${PMS_INDEX}]}"
# (Pretend to) reinstall packages
if [[ -n "${PKGS_TO_REMERGE}" ]]; then