From 1449dd2d0d5318817b658ce201357ceb761c10a9 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Wed, 15 Aug 2007 16:27:56 +0000 Subject: [PATCH] Test fix to avoid a race condition. --- common/makefile-functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/makefile-functions b/common/makefile-functions index 3f4f110..16f7f15 100644 --- a/common/makefile-functions +++ b/common/makefile-functions @@ -64,7 +64,7 @@ endef define remove_existing_dirs @PKG_PATH=`ls -t $(SRCSDIR)/$(1) | head -n1` && \ ROOT=`tar -tf $$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'` && \ - test -n "$$ROOT" -a -d $(SRCSDIR)/$$ROOT && \ + [ -n "$$ROOT" ] && [ -d $(SRCSDIR)/$$ROOT ] && \ rm -rf $(SRCSDIR)/$$ROOT && \ rm -rf $(SRCSDIR)/$${ROOT%-*}-build endef @@ -72,7 +72,7 @@ endef define remove_existing_dirs2 @PKG_PATH=`ls -t $(SRC)/$(1) | head -n1` && \ ROOT=`tar -tf $$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'` && \ - test -n "$$ROOT" -a -d $(SRC)/$$ROOT && \ + [ -n "$$ROOT" ] && [ -d $(SRC)/$$ROOT ] && \ rm -rf $(SRC)/$$ROOT && \ rm -rf $(SRC)/$${ROOT%-*}-build endef