exit 1
fi
-if $upload; then
- :
-else
+if ! $upload; then
if $debian; then
if test "${SUDO_USER}"; then
if test ! -d deb-src; then
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
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
- 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
- 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
- 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
+ echo "Upload successful - we hope"
exit 0
fi