X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=id-deb-build%2Fid-pbuild-root.sh;h=1707786693a948d21c1e868754d1684f2b9a63ce;hb=f84aec471c349d3055cb1ffd06e84d842e8e13e8;hp=d37e205ca814fec77946ac68ac70841ab48e4056;hpb=13a7b0bfb3dc2338c23cd2f0ebde01b3723ca574;p=git-tools-moved-to-github.git diff --git a/id-deb-build/id-pbuild-root.sh b/id-deb-build/id-pbuild-root.sh index d37e205..1707786 100755 --- a/id-deb-build/id-pbuild-root.sh +++ b/id-deb-build/id-pbuild-root.sh @@ -8,6 +8,10 @@ Options: [--dsc=dscfile] [--dist=distribution] [--arch=architecture] + [--home=home] + +This script is should be called with root privilege. It is meant to be +called by id-pbuild.sh. EOF exit $1 } @@ -28,8 +32,11 @@ while test $# -gt 0; do --dsc=*) dsc=$optarg ;; + --home=*) + HOME=$optarg + ;; -*) - do_help=yes + usage 1 ;; esac shift @@ -37,12 +44,23 @@ done PBUILDER=/usr/sbin/pbuilder +if test -z "$dist" -o -z "$arch"; then + echo "dist and arch must be given" + usage 1 +fi rm -fr ${dist}-${arch} -if test ! -f /var/cache/pbuilder/${dist}-${arch}-base.tgz; then - DIST=$dist ARCH=$arch $PBUILDER --create + +if test ! -f $HOME/.pbuilderrc; then + echo "$HOME/.pbuilderrc missing" + exit 1 +fi +if test "$dsc"; then + if test ! -f /var/cache/pbuilder/${dist}-${arch}-base.tgz; then + DIST=$dist ARCH=$arch $PBUILDER --create + fi + DIST=$dist ARCH=$arch $PBUILDER --update --override-config + DIST=$dist ARCH=$arch $PBUILDER --build $dsc fi -DIST=$dist ARCH=$arch $PBUILDER --update --override-config -DIST=$dist ARCH=$arch $PBUILDER --build $dsc # Local Variables: # mode:shell-script