From 59853e1a8164b9fab87c694f63076796849da3ac Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 9 May 2012 13:31:05 +0200 Subject: [PATCH] id-pbuild.sh: allow deb-src to be already present --- id-deb-build/id-mk-deb-src.sh | 6 +----- id-deb-build/id-pbuild.sh | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/id-deb-build/id-mk-deb-src.sh b/id-deb-build/id-mk-deb-src.sh index 4e351bb..c63e772 100755 --- a/id-deb-build/id-mk-deb-src.sh +++ b/id-deb-build/id-mk-deb-src.sh @@ -11,10 +11,6 @@ fi if test -f debian/.gitignore; then cd debian; for i in `cat .gitignore`; do rm -fr $i; done; cd .. fi -if test -d deb-src; then - echo "deb-src exist. You might remove it" - exit 1 -fi l=`head -1 $DEBCHANGELOG` PROD=`echo $l|sed 's/ .*//g'` VERSION=`echo $l|sed 's/.*(//g'|sed 's/).*//g'` @@ -29,7 +25,7 @@ if test ! -f ${TAR}; then exit 1 fi set -e -mkdir deb-src +mkdir -p deb-src ORIG=${PROD}_${MAJOR}.orig.tar.gz echo "TAR=$TAR" echo "ORIG=$ORIG" diff --git a/id-deb-build/id-pbuild.sh b/id-deb-build/id-pbuild.sh index c04e2d7..656b374 100755 --- a/id-deb-build/id-pbuild.sh +++ b/id-deb-build/id-pbuild.sh @@ -73,7 +73,7 @@ if test ! -x $MKDEBSRC; then fi if $upload; then - cd deb-src + : else if test "${SUDO_USER}"; then if test ! -d deb-src; then @@ -81,7 +81,7 @@ else fi else if test -d deb-src; then - rm -rf deb-src + rm -f deb-src/*.gz if test $? -ne 0; then echo "deb-src could not be removed. Remove deb-src manually" exit 1 @@ -89,8 +89,8 @@ else fi $MKDEBSRC fi - cd deb-src fi +cd deb-src for f in *.dsc; do if test -f "$f"; then -- 1.7.10.4