Changeset 681
- Timestamp:
- Aug 13, 2004, 2:45:48 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/technical/common/build/build.sh
r679 r681 1 2 1 #!/bin/bash 3 2 # Remote build script (iboernig@suse.de) … … 62 61 "9.1-i386") 63 62 BUILD_RPMS_TEST=$BUILD_RPMS_9_1_i386 ;; 63 "sles9-i386") 64 BUILD_RPMS_TEST=$BUILD_RPMS_sles9_i386 ;; 64 65 esac 65 66 if [ "$BUILD_RPMS_TEST" ]; then … … 80 81 if [ -z "$1" ]; then 81 82 # without parameter, we are in source directory 82 test -e Makefile && make83 83 SPECFILE=$(ls *.spec | awk '{print $1}') 84 TARFILE=$(ls *.tar.[gb]z*| awk '{print $1}')85 84 PACKAGE=$(awk '/^Name:/ {print $2}' <$SPECFILE) 86 85 VERSION=$(awk '/^Version:/ {print $2}' <$SPECFILE) 86 87 # if config file exist, source it. 88 # after this, the variable SOURCES should be set 89 if [ -r SOURCES ]; then 90 . SOURCES 91 # create a tar file from the sources 92 CREATE_TAR="yes" 93 else 94 # legacy method: 95 # call the existing makefile to generate a tar file 96 test -e Makefile && make 97 TARFILE=$(ls *.tar.[gb]z*| awk '{print $1}') 98 fi 87 99 SRC_FILES="$SPECFILE $TARFILE" 88 100 else … … 103 115 cp -a $SRC_FILES ${BUILDTEMP}/src/${PACKAGE} 104 116 117 if [ "$CREATE_TAR" = "yes" ]; then 118 tar cvjf ${BUILDTEMP}/src/${PACKAGE}/$PACKAGE-$VERSION.tar.bz2 --files-from SOURCES 119 fi 120 105 121 if [ "$1" ]; then 106 122 # extract RPM in a tempoary directory … … 110 126 111 127 # create buildscript 112 113 128 cat > $BUILDSCRIPT <<EOF 114 129 #!/bin/bash … … 125 140 $BUILD_CMD $BUILD_MODE 126 141 EOF 142 127 143 chmod a+x $BUILDSCRIPT 128 144
Note:
See TracChangeset
for help on using the changeset viewer.