- using --eval instead parsing dummy spec file
- new configurations parameter CHMODE (if ="yes" then do chmod 444 )
Changed files:
builder.sh -> 1.42
DEBUG=""
CVSROOT=${CVSROOT:-""}
LOGFILE=""
DEBUG=""
CVSROOT=${CVSROOT:-""}
LOGFILE=""
PACKAGE_VERSION=""
PACKAGE_NAME=""
PACKAGE_VERSION=""
PACKAGE_NAME=""
+if [ -f ~/.builderrc ]; then
+ . ~/.builderrc
+fi
+
#---------------------------------------------
# functions
#---------------------------------------------
# functions
{
if [ -n "$DEBUG" ]; then set -xv; fi
{
if [ -n "$DEBUG" ]; then set -xv; fi
- DUMB_SPEC_FILE=`mktemp -q /tmp/bilder.XXXXXX`
- echo "\
-Summary: -
-Name: dumb
-Version: dumb
-Release: dumb
-Copyright: dumb
-Group: -
-%description
-
-%prep
-echo SOURCE_DIR=%{_sourcedir}
-echo SPECS_DIR=%{_specdir}" > $DUMB_SPEC_FILE
-
- SOURCE_DIR=`rpm -bp $DUMB_SPEC_FILE 2>&1 | grep "^SOURCE_DIR" | sed "s/SOURCE_DIR\=//"`
- SPECS_DIR=`rpm -bp $DUMB_SPEC_FILE 2>&1 | grep "^SPECS_DIR" |sed "s/SPECS_DIR\=//"`
-
- rm -f $DUMB_SPEC_FILE
+ SOURCE_DIR="`rpm --eval "%{_sourcedir}"`"
+ SPECS_DIR="`rpm --eval "%{_specdir}"`"
if [ "$?" -ne "0" ]; then
Exit_error err_no_spec_in_repo;
fi
if [ "$?" -ne "0" ]; then
Exit_error err_no_spec_in_repo;
fi
+
+ if [ "$CHMODE" = "yes" ]; then
+ chmod 444 $SPECFILE
+ fi
if [ "$?" -ne "0" ]; then
Exit_error err_no_source_in_repo;
fi
if [ "$?" -ne "0" ]; then
Exit_error err_no_source_in_repo;
fi
-
- chmod 444 $SOURCES $PATCHES $ICONS
+
+ if [ "$CHMOD" = "yes" ]; then
+ chmod 444 $SOURCES $PATCHES $ICONS
+ fi