]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - builder.sh
- make builder's chmod configurable
[packages/rpm-build-tools.git] / builder.sh
index e0c21ad5995c2eb01e42410fed97ba47f8d75a5e..108327ff54d58ee588b295e19cb59963f6ce3f90 100644 (file)
@@ -25,9 +25,14 @@ DEBUG=""
 NOURLS=""
 NOCVS=""
 ALLWAYS_CVSUP="yes"
-CVSROOT=${CVSROOT:-""}
+if [ -s CVS/Root ]; then
+    CVSROOT=$(cat CVS/Root)
+else
+    CVSROOT=${CVSROOT:-""}
+fi
 LOGFILE=""
-CHMOD="yes"
+CHMOD=${CHMOD:-"yes"}
+CHMOD_MODE=${CHMOD_MODE:-444}
 RPMOPTS=""
 BCOND=""
 
@@ -37,12 +42,13 @@ ICONS=""
 PACKAGE_RELEASE=""
 PACKAGE_VERSION=""
 PACKAGE_NAME=""
+WGET_RETRIES=${MAX_WGET_RETRIES:-0}
 
 DEF_NICE_LEVEL=0
 
 FAIL_IF_NO_SOURCES="yes"
 
-GETURI="wget -c -nd -t0"
+GETURI="wget -c -nd -t$WGET_RETRIES"
 
 if [ -f ~/etc/builderrc ]; then
   . ~/etc/builderrc
@@ -207,7 +213,7 @@ get_spec()
        fi
     
     if [ "$CHMOD" = "yes" -a -n "$SPECFILE" ]; then
-        chmod 444 $SPECFILE
+        chmod $CHMOD_MODE $SPECFILE
     fi
     unset OPTIONS
 }
@@ -264,7 +270,7 @@ get_files()
        if [ "$CHMOD" = "yes" ]; then
            CHMOD_FILES="`nourl $GET_FILES`"
            if [ -n "$CHMOD_FILES" ]; then
-                   chmod 444 $CHMOD_FILES
+                   chmod $CHMOD_MODE $CHMOD_FILES
            fi
        fi
        unset OPTIONS
@@ -382,7 +388,7 @@ while test $# -gt 0 ; do
        --opts )
            shift; RPMOPTS="${1}"; shift ;;
        --with | --without )
-           BCOND="$1 $2" ; shift 2 ;;
+           BCOND="$BCOND $1 $2" ; shift 2 ;;
        -q | --quiet )
            QUIET="--quiet"; shift ;;
        -r | --cvstag )
@@ -458,6 +464,20 @@ esac
 cd $__PWD
 
 # $Log$
+# Revision 1.83  2001/10/10 08:41:32  misiek
+# - allow more bconds than one
+#
+# Revision 1.82  2001/09/18 10:55:37  ankry
+# - added support for limitting number of wget retries when fetching a file
+#   from ftp/http server via environment variable MAX_WGET_RETRIES.
+#   Defaults to infinite (0).
+#
+# Revision 1.81  2001/07/06 16:52:30  misiek
+# - by default use CVSroot from CVS/Root and if it doesn't exist use from CVSROOT variable
+#
+# Revision 1.80  2001/06/22 18:52:39  misiek
+# - added support for --with/--without options
+#
 # Revision 1.79  2001/05/28 14:44:16  baggins
 # - if file is not in repo TELL which fucking file it is!
 #
This page took 0.027667 seconds and 4 git commands to generate.