diff options
author | François Andriot <albator78@libertysurf.fr> | 2014-04-15 19:43:15 +0200 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2014-04-15 19:43:15 +0200 |
commit | 41284c83ff5be87bbc957f646c0db642e93cc722 (patch) | |
tree | 8b61e4e593c0e6f94cfe83c4ea363fc62e83bcab /redhat/build/update_repository.sh | |
parent | 062d4cb70976cec2a15349c6abe70a506d19f1d5 (diff) | |
download | tde-packaging-41284c83ff5be87bbc957f646c0db642e93cc722.tar.gz tde-packaging-41284c83ff5be87bbc957f646c0db642e93cc722.zip |
RPM Packaging: update build scripts
Diffstat (limited to 'redhat/build/update_repository.sh')
-rwxr-xr-x | redhat/build/update_repository.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/redhat/build/update_repository.sh b/redhat/build/update_repository.sh index c651fc3f5..1f2216152 100755 --- a/redhat/build/update_repository.sh +++ b/redhat/build/update_repository.sh @@ -9,14 +9,20 @@ while [ -e "${LOCKFILE}" ]; do sleep 3 done +ARCH="$(rpm -E %{_target_cpu})" +RPMDIR=$(rpm -E %{_rpmdir}.tde-${TDE_VERSION}) + +[ -d "${RPMDIR}/noarch" ] || mkdir -p "${RPMDIR}/noarch" +[ -d "${RPMDIR}/${ARCH}" ] || mkdir -p "${RPMDIR}/${ARCH}" + if [ -x /usr/sbin/urpmi ]; then - REPOUPDATE='(cd $(rpm -E %{_rpmdir}.tde-${TDE_VERSION}); genhdlist2 --clean --allow-empty noarch; genhdlist2 --clean --allow-empty $(uname -i); sudo urpmi.update rpmbuild.$(uname -i) rpmbuild.noarch)' + REPOUPDATE='(cd ${RPMDIR}; genhdlist2 --clean --allow-empty noarch & genhdlist2 --clean --allow-empty ${ARCH} & wait; sudo urpmi.update rpmbuild.${ARCH} rpmbuild.noarch)' elif [ -x /usr/bin/zypper ]; then - REPOUPDATE='(cd $(rpm -E %{_rpmdir}.tde-${TDE_VERSION}); createrepo --workers=${WORKERS} $(uname -i); createrepo --workers=${WORKERS} noarch; sudo zypper refresh rpmbuild.$(uname -i) rpmbuild.noarch)' + REPOUPDATE='(cd ${RPMDIR}; createrepo --workers=${WORKERS} ${ARCH} & createrepo --workers=${WORKERS} noarch & wait; sudo zypper refresh rpmbuild.${ARCH} rpmbuild.noarch)' elif [ -x /usr/bin/yum ]; then - REPOUPDATE='(cd $(rpm -E %{_rpmdir}.tde-${TDE_VERSION}); createrepo $(uname -i); createrepo noarch; sudo yum clean all --disablerepo="*" --enablerepo="rpmbuild*")' + REPOUPDATE='(cd ${RPMDIR}; createrepo ${ARCH} & createrepo noarch & wait; sudo yum clean all --disablerepo="*" --enablerepo="rpmbuild*")' elif [ -x /usr/bin/apt-get ]; then - REPOUPDATE='(cd $(rpm -E %{_rpmdir}.tde-${TDE_VERSION}); genpkglist $PWD noarch; genpkglist $PWD i586; genpkglist $PWD x86_64; genbasedir $PWD i586 x86_64 noarch; sudo apt-get update)' + REPOUPDATE='(cd ${RPMDIR}; genpkglist $PWD noarch & genpkglist $PWD ${ARCH} & wait; genbasedir $PWD ${ARCH} noarch; sudo apt-get update)' fi -eval "${REPOUPDATE}; rm -f ${LOCKFILE}"|| exit 1 +eval "${REPOUPDATE}; rm -f ${LOCKFILE}" || exit 1 |