commit a958d6ce6e3540d977db28f41af029295de30d9b
Author: Elan Ruusamäe <[email protected]>
Date:   Mon Jul 4 11:07:28 2016 +0300

    add --network option

 cleanbuild | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/cleanbuild b/cleanbuild
index 59509ce..0622ab7 100755
--- a/cleanbuild
+++ b/cleanbuild
@@ -43,6 +43,7 @@ usage() {
        echo " --cleanafter | -ca  - clean after build"
        echo " --forceumount | -fu - force umount tmpfs"
        echo " --debug             - enable debug"
+       echo " --network           - allow build to use networking"
        echo " -a, -b, -c, -d, -e  - select alternative chroot directory"
        exit 1
 }
@@ -51,6 +52,7 @@ FETCH=false
 CLEAN=false
 CREATE=false
 BUILD=false
+NETWORK=false
 INSTALL=false
 
 case "$0" in
@@ -125,6 +127,9 @@ while [ $# -gt 0 ]; do
                --debug)
                        NODEBUG=false
                        ;;
+               --network)
+                       NETWORK=true
+                       ;;
                --forceumount | -fu)
                        FORCE_UMOUNT=true
                        ;;
@@ -428,7 +433,7 @@ maybe_call()
        local func="$1"; shift
 
        [ $cond = "false" ] && return
-       $func "$@"
+       "$func" "$@"
        [ $cond = "exit_after" ] && exit
 }
 
@@ -469,6 +474,8 @@ echo $$ > $CHDIR/.pid
 
 maybe_call $INSTALL poldek_install "$*"
 
+maybe_call $NETWORK cp -bf /etc/resolv.conf $CHDIR/etc/
+
 $BUILD || exit
 
 if [ -p /tmp/fixfreq ]; then
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/cleanbuild.git/commitdiff/a958d6ce6e3540d977db28f41af029295de30d9b

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to