summaryrefslogtreecommitdiffstats
path: root/redhat/build/get_specfile.sh
diff options
context:
space:
mode:
Diffstat (limited to 'redhat/build/get_specfile.sh')
-rwxr-xr-xredhat/build/get_specfile.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/redhat/build/get_specfile.sh b/redhat/build/get_specfile.sh
index 8f4b542e0..ac59434a7 100755
--- a/redhat/build/get_specfile.sh
+++ b/redhat/build/get_specfile.sh
@@ -5,23 +5,24 @@ TDE_VERSION="${2:-14.0.0}"
[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
-[ -d "${PACKAGING_DIR}" ] || PACKAGING_DIR=~/tde/tde-packaging/redhat
+[ -d "${PACKAGING_DIR}" ] || PACKAGING_DIR=~/tde/tde-packaging
+[ -d "${DIST_PACKAGING_DIR}" ] || DIST_PACKAGING_DIR=${PACKAGING_DIR}/redhat
# Special case for QT3
if [ "${PKGNAME}" = "qt3" ]; then
case "$(rpmdist.sh --dist)" in
- .oss*) PACKAGING_DIR=~/tde/tde-packaging/opensuse ;;
- .mga*|.mdk*|.pclos*) PACKAGING_DIR=~/tde/tde-packaging/mageia ;;
+ .oss*) DIST_PACKAGING_DIR=${PACKAGING_DIR}/opensuse ;;
+ .mga*|.mdk*|.pclos*) DIST_PACKAGING_DIR=${PACKAGING_DIR}/mageia ;;
esac
fi
-SPECFILE=$(find "${PACKAGING_DIR}" -name "${PKGNAME}-${TDE_VERSION}.spec")
+SPECFILE=$(find "${DIST_PACKAGING_DIR}" -name "${PKGNAME}-${TDE_VERSION}.spec")
if [ ! -r "${SPECFILE}" ]; then
- SPECFILE=$(find "${PACKAGING_DIR}" -name "${PKGNAME}.spec")
+ SPECFILE=$(find "${DIST_PACKAGING_DIR}" -name "${PKGNAME}.spec")
if [ ! -r "${SPECFILE}" ]; then
- SPECFILE=$(find "${PACKAGING_DIR}" -name "trinity-${PKGNAME}-${TDE_VERSION}.spec")
+ SPECFILE=$(find "${DIST_PACKAGING_DIR}" -name "trinity-${PKGNAME}-${TDE_VERSION}.spec")
if [ ! -r "${SPECFILE}" ]; then
- SPECFILE=$(find "${PACKAGING_DIR}" -name "trinity-${PKGNAME}.spec")
+ SPECFILE=$(find "${DIST_PACKAGING_DIR}" -name "trinity-${PKGNAME}.spec")
fi
fi
fi