Changeset 619 for trunk/technical/common/build/build.sh
- Timestamp:
- Oct 10, 2002, 5:01:08 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/technical/common/build/build.sh
r617 r619 1 1 #!/bin/bash 2 2 # Remote build script (iboernig@suse.de) 3 # $Id: build.sh,v 1.1 0 2002/10/08 16:30:28 joergs Exp $3 # $Id: build.sh,v 1.11 2002/10/10 15:01:08 joergs Exp $ 4 4 # 5 5 # Kurze Featuritis: … … 26 26 BUILDTEMP=abuildtmp 27 27 BUILDUSER=$USER 28 # setzen der Zielarchtitektur. Wird bei Bedarf durch noarch überschrieben.29 ARCH=i38630 OS_TYPE=sles31 OS_VER=732 28 33 [ -z "$BUILD_MODE" ] && BUILD_MODE="-- clean"34 [ -z "$BUILD_DIST" ] && BUILD_DIST=" ${OS_TYPE}${OS_VER}-$ARCH"29 [ -z "$BUILD_MODE" ] && BUILD_MODE="--verify" 30 [ -z "$BUILD_DIST" ] && BUILD_DIST="sles7-i386+update" 35 31 [ -z "$BUILD_ROOT" ] && BUILD_ROOT="/abuild/buildsystem.$BUILDHOST.$USER.$BUILD_DIST.smartclient" 36 32 [ -z "$BUILD_PREPARE_SPEC" ] && BUILD_PREPARE_SPEC="no" 37 33 38 [ -z $DEST_DIR ] && DEST_DIR="/tmp/smartclient_build/ $BUILD_DIST"34 [ -z $DEST_DIR ] && DEST_DIR="/tmp/smartclient_build/" 39 35 40 36 # Hier gehts los: … … 52 48 VERSION=$(awk '/^Version:/ {print $2}' <$SPECFILE) 53 49 54 BUILDARCH=$(awk '/^BuildArch:/ {print $2}' <$SPECFILE) 55 [ -z "$BUILDARCH" ] && BUILDARCH=$ARCH 50 ERROR=0 56 51 57 echo $PACKAGE $VERSION $ ARCH $BUILDARCH52 echo $PACKAGE $VERSION $BUILD_DIST 58 53 59 54 # Cleaning up and install tempdir 60 55 ssh -${SSH_VERSION} ${FQBUILDHOST} "rm -r ${BUILDTEMP}/src/${PACKAGE}-${VERSION}; \ 61 mkdir -p ${BUILDTEMP}/src/${PACKAGE}-${VERSION}\ 62 mkdir -p ${BUILDTEMP}/${ARCH}/${OS_TYPE}/${OS_VER}"; 56 mkdir -p ${BUILDTEMP}/src/${PACKAGE}-${VERSION} ${BUILDTEMP}/${BUILD_DIST}"; 63 57 64 58 scp -oProtocol=$SSH_VERSION $TARFILE $SPECFILE $DIFFILES $PATCHFILES $RESTFILES ${FQBUILDHOST}:${BUILDTEMP}/src/${PACKAGE}-${VERSION} … … 78 72 79 73 cd ~${BUILDUSER}/${BUILDTEMP}/src/${PACKAGE}-${VERSION} 80 build $BUILD_MODE --prefer-rpms ~${BUILDUSER}/${BUILDTEMP}/$ARCH/$OS_TYPE/$OS_VER74 build $BUILD_MODE --prefer-rpms ~${BUILDUSER}/${BUILDTEMP}/${BUILD_DIST} 81 75 EOF 82 76 … … 90 84 . ~$BUILDUSER/${BUILDTEMP}/src/${PACKAGE}-${VERSION}/buildscript 91 85 ssh -oProtocol=$SSH_VERSION ${FQBUILDHOST} \ 92 cp ${BUILD_ROOT}/usr/src/packages/RPMS/ ${BUILDARCH}/${PACKAGE}-${VERSION}-*.${BUILDARCH}.rpm ${BUILDTEMP}/$ARCH/$OS_TYPE/$OS_VER/86 cp ${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${BUILDTEMP}/${BUILD_DIST}/ 93 87 94 88 mkdir -p ${DEST_DIR}/src 95 96 if !(scp -oProtocol=$SSH_VERSION root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/SRPMS/${PACKAGE}-${VERSION}-*.src.rpm ${DEST_DIR}/src;) 97 then 98 echo "ERROR while building packet $PACKAGE"; 99 echo "";sleep 1;echo "";sleep 1;echo "";sleep 1;echo "";sleep 1;echo "";sleep 1; 100 sleep 10; 89 if !(scp -oProtocol=$SSH_VERSION root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/SRPMS/${PACKAGE}-${VERSION}-*.src.rpm ${DEST_DIR}/src ); then 90 ERROR=1 101 91 fi 102 92 103 mkdir -p ${DEST_DIR}/$ARCH/$OS_TYPE/$OS_VER 104 if !(scp -oProtocol=$SSH_VERSION root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/RPMS/${BUILDARCH}/${PACKAGE}-${VERSION}-*.${BUILDARCH}.rpm ${DEST_DIR}/$ARCH/$OS_TYPE/$OS_VER;) 105 then 106 echo "ERROR while building packet $PACKAGE"; 107 echo "";sleep 1;echo "";sleep 1;echo "";sleep 1;echo "";sleep 1;echo "";sleep 1; 108 sleep 10; 109 exit 1; 93 mkdir -p ${DEST_DIR}/${BUILD_DIST} 94 if !(scp -oProtocol=$SSH_VERSION root@${FQBUILDHOST}:${BUILD_ROOT}/usr/src/packages/RPMS/*/${PACKAGE}-${VERSION}-*.*.rpm ${DEST_DIR}/${BUILD_DIST} ); then 95 ERROR=2 110 96 fi 111 97 112 echo "Build of ${PACKAGE} completed!" 113 echo "Packages can be found in ${DEST_DIR}" 98 if [ $ERROR -ne 0 ]; then 99 echo "ERROR while building packet $PACKAGE"; 100 for i in `seq 5`; do 101 echo -n ""; sleep 1; 102 done 103 else 104 echo "Build of ${PACKAGE} completed!" 105 echo "Packages can be found in ${DEST_DIR}" 106 fi 107 108 exit $ERROR
Note:
See TracChangeset
for help on using the changeset viewer.