#!/bin/bash printUsage() { echo "rpmFactory fonctionne avec un fichier de configuration." echo "rpmFactory construit un RPM et compile ce dernier sur un serveur distant" exit 0 } [ -n "$MYRPM" ] || printUsage #CODE #rm -f *.rpm #$MYRPM -N $APPLI -V $VERSION -R $RELEASE -S "$SUMMARY" -D "$DESCRIPTION" -n -b -d . -r . -x "$EXCLUDE" -C "$CHANGELOG" --requires="$REQUIRES" --pre-script="pre.sh" --post-script="post.sh" &>$PWD/packaging.log echo $MYRPM if [ "$VERBOSE" -eq "1" ]; then VERBOSE="-v" else VERBOSE="" fi $MYRPM -N $APPLI -V $VERSION -R $RELEASE -S "$SUMMARY" -D "$DESCRIPTION" $VERBOSE -n -b -d . -r . -x "$EXCLUDE" -C "$CHANGELOG" --requires="$REQUIRES" --pre-script="pre.sh" --post-script="post.sh" cp $LTOPDIR/$SDIR/$APPLI-$VERSION-$RELEASE.src.rpm . cp $LTOPDIR/$X64DIR/$APPLI-$VERSION-$RELEASE.`arch`.rpm . if [ "$1" == "--push" ]; then . pushRpm $APPLI-$VERSION-$RELEASE.src.rpm $APPLI-$VERSION-$RELEASE.x86_64.rpm fi if [ "$1" == "--pushProd" ]; then . pushRpmProd $APPLI-$VERSION-$RELEASE.src.rpm $APPLI-$VERSION-$RELEASE.x86_64.rpm fi