X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=id-deb-build%2Fid-pbuild.sh;h=03e48f0d05b319553f7234ea985dabfb34b526d9;hb=61ccccd556208dab55c8031de69887d8c00ac31c;hp=cab6efa8c65be04d3a43849f888d358299cba8ba;hpb=b620a4bad53041c173c0c93e827cdf54a9033404;p=git-tools-moved-to-github.git diff --git a/id-deb-build/id-pbuild.sh b/id-deb-build/id-pbuild.sh index cab6efa..03e48f0 100755 --- a/id-deb-build/id-pbuild.sh +++ b/id-deb-build/id-pbuild.sh @@ -43,6 +43,9 @@ while test $# -gt 0; do --upload) upload=true ;; + --remote=*) + REMOTE=$optarg + ;; -*) do_help=yes ;; @@ -54,6 +57,24 @@ if test "$do_help" = "yes"; then usage 1 1>&2 fi +if test "$REMOTE"; then + if test ! -d deb-src; then + echo "deb-src not in current directory" + exit 1 + fi + cd deb-src + PRODUCT=`echo *.dsc|sed 's/_.*//g'` + cd .. + ssh $REMOTE "mkdir -p $PRODUCT/deb-src" + scp IDMETA $REMOTE:$PRODUCT + scp deb-src/*.gz deb-src/*.dsc $REMOTE:$PRODUCT/deb-src + if $upload; then + ssh $REMOTE "cd $PRODUCT; \$HOME/proj/git-tools/id-deb-build/id-pbuild.sh --upload" + else + ssh $REMOTE "cd $PRODUCT; sudo \$HOME/proj/git-tools/id-deb-build/id-pbuild.sh" + fi + exit 0 +fi if test -d deb-src; then cd deb-src fi @@ -94,6 +115,14 @@ if $upload; then echo "./update-archive.sh" exit 0 fi +# remove existing package directories +for f in [a-z]*; do + if test -d $f; then + rm -fr $f + fi +done +rm -f *.log + i=0 date