diff options
Diffstat (limited to 'redhat/build')
-rwxr-xr-x | redhat/build/update_repository.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/redhat/build/update_repository.sh b/redhat/build/update_repository.sh index 83887fd9b..641cdf2db 100755 --- a/redhat/build/update_repository.sh +++ b/redhat/build/update_repository.sh @@ -11,6 +11,7 @@ done ARCH="$(rpm -E %{_target_cpu})" RPMDIR=$(rpm -E %{_rpmdir}.tde-${TDE_VERSION}) +dist="$(rpm -E %dist)" [ -d "${RPMDIR}/noarch" ] || mkdir -p "${RPMDIR}/noarch" [ -d "${RPMDIR}/${ARCH}" ] || mkdir -p "${RPMDIR}/${ARCH}" @@ -23,7 +24,7 @@ elif [ -x /usr/bin/zypper ]; then REPOUPDATE='(cd ${RPMDIR}; createrepo --workers=${WORKERS} ${ARCH} & createrepo --workers=${WORKERS} noarch & wait; sudo zypper refresh rpmbuild.${ARCH} rpmbuild.noarch)' #REPOUPDATE='(rsync -av ${RPMDIR}/ /tmp/rpm${dist}/ && cd /tmp/rpm${dist}; umask 0000; createrepo --workers=${WORKERS} ${ARCH} & createrepo --workers=${WORKERS} noarch & wait; rsync -av /tmp/rpm${dist}/ ${RPMDIR}/; sudo zypper refresh rpmbuild.${ARCH} rpmbuild.noarch)' elif [ -x /usr/bin/yum ]; then - if [ "$(rpm -E %dist)" = ".el5" ]; then + if [ "${dist}" = ".el5" ]; then REPOUPDATE='(cd ${RPMDIR}; createrepo ${ARCH} & createrepo noarch & wait; sudo yum clean metadata --disablerepo="*" --enablerepo="rpmbuild*")' else REPOUPDATE='(cd ${RPMDIR}; createrepo --workers=${WORKERS} ${ARCH} & createrepo --workers=${WORKERS} noarch & wait; sudo yum clean metadata --disablerepo="*" --enablerepo="rpmbuild*")' |