echo "BUILDENGINE='$BUILDENGINE'" >> $BUILD_ROOT/.build/build.data
echo "CCACHE='$CCACHE'" >> $BUILD_ROOT/.build/build.data
echo "ABUILD_TARGET='$ABUILD_TARGET'" >> $BUILD_ROOT/.build/build.data
- # use the rpmbuild --stage option 689
- if [ ! -z $BUILD_RPM_BUILD_STAGE ]; then 690
- echo "BUILD_RPM_BUILD_STAGE='-$BUILD_RPM_BUILD_STAGE'" >> $BUILD_ROOT/.build/build.data 691
+ # use the rpmbuild --stage option
+ if [ ! -z $BUILD_RPM_BUILD_STAGE ]; then
+ if [[ "$BUILD_RPM_BUILD_STAGE" =~ ^- ]]; then
+ echo "BUILD_RPM_BUILD_STAGE='$BUILD_RPM_BUILD_STAGE'" >> $BUILD_ROOT/.build/build.data
+ else
+ echo "BUILD_RPM_BUILD_STAGE='-$BUILD_RPM_BUILD_STAGE'" >> $BUILD_ROOT/.build/build.data
+ fi
fi
# fallback time for broken hosts
date '+@%s' > $BUILD_ROOT/.build/.date