projects
/
git-tools-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Provide 'successful' message if upload succeeds GA-12
[git-tools-moved-to-github.git]
/
id-deb-build
/
id-pbuild.sh
diff --git
a/id-deb-build/id-pbuild.sh
b/id-deb-build/id-pbuild.sh
index
037b8ca
..
a8206a1
100755
(executable)
--- a/
id-deb-build/id-pbuild.sh
+++ b/
id-deb-build/id-pbuild.sh
@@
-88,9
+88,7
@@
if test ! -x $MKDEBSRC; then
exit 1
fi
exit 1
fi
-if $upload; then
- :
-else
+if ! $upload; then
if $debian; then
if test "${SUDO_USER}"; then
if test ! -d deb-src; then
if $debian; then
if test "${SUDO_USER}"; then
if test ! -d deb-src; then
@@
-169,9
+167,7
@@
if $upload; then
for dist in ${CENTOS_DIST}; do
arch=amd64
prodver=${PRODUCT}-${VERSION}
for dist in ${CENTOS_DIST}; do
arch=amd64
prodver=${PRODUCT}-${VERSION}
- if scp ${ID_DEB_BUILD}/../id-rpm-build/upload-rpms.sh ${dist}:rpmbuild/SOURCES/${prodver}/; then
- :
- else
+ if ! scp ${ID_DEB_BUILD}/../id-rpm-build/upload-rpms.sh ${dist}:rpmbuild/SOURCES/${prodver}/; then
echo "Copy of upload-rpms.sh to $dist failed"
exit 1
fi
echo "Copy of upload-rpms.sh to $dist failed"
exit 1
fi
@@
-183,17
+179,32
@@
if $upload; then
fi
done
for dist in ${UBUNTU_DIST}; do
fi
done
for dist in ${UBUNTU_DIST}; do
- scp ${dist}-*/* ftp.indexdata.dk:/home/ftp/pub/${PRODUCT}/ubuntu/${dist}
+ ssh ftp.indexdata.dk "mkdir -p /home/ftp/pub/${PRODUCT}/ubuntu/${dist}"
+ if ! scp ${dist}-*/* ftp.indexdata.dk:/home/ftp/pub/${PRODUCT}/ubuntu/${dist}; then
+ echo "Upload failed for $dist"
+ exit 1
+ fi
done
for dist in ${DEBIAN_DIST}; do
done
for dist in ${DEBIAN_DIST}; do
- scp ${dist}-*/* ftp.indexdata.dk:/home/ftp/pub/${PRODUCT}/debian/${dist}
+ ssh ftp.indexdata.dk "mkdir -p /home/ftp/pub/${PRODUCT}/debian/${dist}"
+ if ! scp ${dist}-*/* ftp.indexdata.dk:/home/ftp/pub/${PRODUCT}/debian/${dist}; then
+ echo "Upload failed for $dist"
+ exit 1
+ fi
done
if test "${CENTOS_DIST}"; then
done
if test "${CENTOS_DIST}"; then
- ssh ftp.indexdata.dk "sudo -n /home/indexdata/proj/git-tools/update-archive/update-yum-archive.sh"
+ if ! ssh ftp.indexdata.dk "sudo -n /home/indexdata/proj/git-tools/update-archive/update-yum-archive.sh"; then
+ echo "update-yum-archive.sh failed"
+ exit 1
+ fi
fi
if test "${UBUNTU_DIST}" -o "${DEBIAN_DIST}"; then
fi
if test "${UBUNTU_DIST}" -o "${DEBIAN_DIST}"; then
- ssh ftp.indexdata.dk "sudo -n /home/indexdata/proj/git-tools/update-archive/update-archive.sh --ubuntu=\"${UBUNTU_DIST}\" --debian=\"${DEBIAN_DIST}\""
+ if ! ssh ftp.indexdata.dk "sudo -n /home/indexdata/proj/git-tools/update-archive/update-archive.sh --ubuntu=\"${UBUNTU_DIST}\" --debian=\"${DEBIAN_DIST}\""; then
+ echo "update-archive.sh failed"
+ exit 1
+ fi
fi
fi
+ echo "Upload successful - we hope"
exit 0
fi
exit 0
fi