summaryrefslogtreecommitdiffstats
path: root/redhat/build/update_repository.sh
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2014-04-04 21:17:27 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2014-04-04 21:17:27 +0200
commit7b26da834f79b8b6eb2d8e99a1467ffea2791380 (patch)
treef26773747d20d14d82fe43fd5c245d2f9e803eee /redhat/build/update_repository.sh
parent61c9cb24d0d3319c8c800fabf1af8153dcabce2c (diff)
downloadtde-packaging-7b26da834f79b8b6eb2d8e99a1467ffea2791380.tar.gz
tde-packaging-7b26da834f79b8b6eb2d8e99a1467ffea2791380.zip
RPM Packaging: update build scripts
Diffstat (limited to 'redhat/build/update_repository.sh')
-rwxr-xr-xredhat/build/update_repository.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/redhat/build/update_repository.sh b/redhat/build/update_repository.sh
index 8ffeabe93..c651fc3f5 100755
--- a/redhat/build/update_repository.sh
+++ b/redhat/build/update_repository.sh
@@ -1,6 +1,7 @@
#!/bin/bash
WORKERS=$(getconf _NPROCESSORS_ONLN)
+TDE_VERSION="${1:-14.0.0}"
LOCKFILE="/tmp/lock.${0##*/}"
while [ -e "${LOCKFILE}" ]; do
@@ -9,13 +10,13 @@ while [ -e "${LOCKFILE}" ]; do
done
if [ -x /usr/sbin/urpmi ]; then
- REPOUPDATE='(cd $(rpm -E %{_rpmdir}); genhdlist2 --clean --allow-empty noarch; genhdlist2 --clean --allow-empty $(uname -i); sudo urpmi.update rpmbuild.$(uname -i) rpmbuild.noarch)'
+ 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)'
elif [ -x /usr/bin/zypper ]; then
- REPOUPDATE='(cd $(rpm -E %{_rpmdir}); createrepo --workers=${WORKERS} $(uname -i); createrepo --workers=${WORKERS} noarch; sudo zypper refresh rpmbuild.$(uname -i) rpmbuild.noarch)'
+ 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)'
elif [ -x /usr/bin/yum ]; then
- REPOUPDATE='(cd $(rpm -E %{_rpmdir}); createrepo $(uname -i); createrepo noarch; sudo yum clean all --disablerepo="*" --enablerepo="rpmbuild*")'
+ REPOUPDATE='(cd $(rpm -E %{_rpmdir}.tde-${TDE_VERSION}); createrepo $(uname -i); createrepo noarch; sudo yum clean all --disablerepo="*" --enablerepo="rpmbuild*")'
elif [ -x /usr/bin/apt-get ]; then
- REPOUPDATE='(cd $(rpm -E %{_rpmdir}); genpkglist $PWD noarch; genpkglist $PWD i586; genpkglist $PWD x86_64; genbasedir $PWD i586 x86_64 noarch; sudo apt-get update)'
+ 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)'
fi
eval "${REPOUPDATE}; rm -f ${LOCKFILE}"|| exit 1