From: Adam Dickmeiss Date: Fri, 30 Dec 2016 16:52:28 +0000 (+0100) Subject: Only sudo rm if necessary X-Git-Url: http://jira.indexdata.com/?a=commitdiff_plain;h=6b14f85502f53aaee3cf1f7fba4cd6fc09bf9b3b;p=git-tools-moved-to-github.git Only sudo rm if necessary --- diff --git a/id-deb-build/docker-build.sh b/id-deb-build/docker-build.sh index e608f79..ce331a6 100755 --- a/id-deb-build/docker-build.sh +++ b/id-deb-build/docker-build.sh @@ -141,7 +141,7 @@ fi if $centos; then for dist in ${CENTOS_DIST}; do - sudo rm -fr build/centos/$dist + test -d build/centos/$dist && sudo rm -fr build/centos/$dist mkdir -p build/centos/$dist/rpmbuild mkdir -p build/centos/$dist/rpmbuild/BUILD mkdir -p build/centos/$dist/rpmbuild/BUILDROOT @@ -186,7 +186,7 @@ if $debian; then if test "${DEBIAN_DIST}"; then for dist in ${DEBIAN_DIST}; do - sudo rm -fr build/debian/$dist + test -f build/debian/$dist && sudo rm -fr build/debian/$dist mkdir -p build/debian cp -a deb-src build/debian/$dist cp ${ID_DEB_BUILD}/in-docker.sh build/debian/$dist