]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- added support to ~/.builderrc
authorArtur Frysiak <artur@frysiak.net>
Tue, 9 Nov 1999 11:12:24 +0000 (11:12 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- using --eval instead parsing dummy spec file
- new configurations parameter CHMODE (if ="yes" then do chmod 444 )

Changed files:
    builder.sh -> 1.42

builder.sh

index 1987af2706fd72e5523ba0622e16f8208163cefa..da7a2757f05dfdca6c0754b842321b4e4e968647 100644 (file)
@@ -23,6 +23,7 @@ CLEAN=""
 DEBUG=""
 CVSROOT=${CVSROOT:-""}
 LOGFILE=""
+CHMOD="yes"
 
 PATCHES=""
 SOURCES=""
@@ -31,6 +32,10 @@ PACKAGE_RELEASE=""
 PACKAGE_VERSION=""
 PACKAGE_NAME=""
 
+if [ -f ~/.builderrc ]; then
+  . ~/.builderrc
+fi
+
 #---------------------------------------------
 # functions
 
@@ -127,24 +132,8 @@ init_builder()
 {
     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}"`"
 
     __PWD=`pwd`
 }
@@ -170,8 +159,10 @@ get_spec()
     if [ "$?" -ne "0" ]; then
        Exit_error err_no_spec_in_repo;
     fi
-
-    chmod 444 $SPECFILE
+    
+    if [ "$CHMODE" = "yes" ]; then
+        chmod 444 $SPECFILE
+    fi
     unset OPTIONS
 }
 
@@ -196,8 +187,10 @@ get_all_files()
        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
        unset OPTIONS
     fi
 }
This page took 0.037376 seconds and 4 git commands to generate.