Do not require git-tools on remote CentOS dist
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 14 Mar 2013 12:43:19 +0000 (13:43 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 14 Mar 2013 12:43:19 +0000 (13:43 +0100)
id-deb-build/id-pbuild.sh

index ce96760..8985207 100755 (executable)
@@ -164,9 +164,15 @@ if $upload; then
     for dist in ${CENTOS_DIST}; do
        arch=amd64
        prodver=${PRODUCT}-${VERSION}
-       if ssh $dist "cd rpmbuild/SOURCES/${prodver} && ../../../proj/git-tools/id-rpm-build/upload-rpms.sh ${PRODUCT}.spec"; then
+       if scp ${ID_DEB_BUILD}/../id-rpm-build/upload-rpms.sh ${dist}:rpmbuild/SOURCES/${prodver}/; then
            :
-           else
+       else
+           echo "Copy of upload-rpms.sh to $dist failed"
+           exit 1
+       fi
+       if ssh $dist "cd rpmbuild/SOURCES/${prodver} && chmod +x upload-rpms.sh && ./upload-rpms.sh ${PRODUCT}.spec"; then
+           :
+       else
            echo "Upload failed for $dist"
            exit 1
        fi
@@ -204,10 +210,10 @@ for dist in ${CENTOS_DIST}; do
        exit 1
     fi
 
-    if ssh $dist "test -f .rpmmacros && test -d rpmbuild/SOURCES && test -d rpmbuild/RPMS && test -d rpmbuild/SRPMS && test -x proj/git-tools/id-rpm-build/upload-rpms.sh"; then
+    if ssh $dist "test -f .rpmmacros && test -d rpmbuild/SOURCES && test -d rpmbuild/RPMS && test -d rpmbuild/SRPMS"; then
        :
     else
-       echo "Host $dist does not seem to be prepared with git-tools and rpmbuild directories"
+       echo "Host $dist does not seem to be prepared with rpmbuild directories"
        exit 1
     fi