aboutsummaryrefslogtreecommitdiffstats
path: root/common/scripts/application-lifecycle.sh
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2020-08-10 10:54:38 +0200
committerCorentin LABBE <clabbe@baylibre.com>2020-08-10 13:19:56 +0200
commit92236d15fc6d88a2f22524ce11691c29deaebd82 (patch)
treec5271210d2c53e6c9430f77a8acddd9bdc722e4d /common/scripts/application-lifecycle.sh
parentfcefef408d150eb3fc3d63efdcc370973b54eaeb (diff)
SPEC-3533: unzip wgt files in a dedicated directory
For finding wgtname, we download an index.html and the WGT archive could contains a file with the same name and unzip complain about replacing a file. The solution is to unzip in an empty dedicated directory. Change-Id: I9680eb8909256e749a2b5177ed1d942add841af5 BUG-AGL: SPEC-3533 Signed-off-by: Corentin LABBE <clabbe@baylibre.com>
Diffstat (limited to 'common/scripts/application-lifecycle.sh')
-rwxr-xr-xcommon/scripts/application-lifecycle.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/common/scripts/application-lifecycle.sh b/common/scripts/application-lifecycle.sh
index 0bdc6d4..0935fd2 100755
--- a/common/scripts/application-lifecycle.sh
+++ b/common/scripts/application-lifecycle.sh
@@ -64,9 +64,12 @@ do
continue
fi
fi
+ CURDIR="$(pwd)"
+ ZIPOUT="$(mktemp -d)"
+ cd $ZIPOUT
echo "DEBUG: analyse wgt file"
- unzip $wgtfile
+ unzip $CURDIR/$wgtfile
if [ $? -ne 0 ];then
# TODO Do not fail yet, busybox unzip seems to "fail with success" when checking CRC
echo "ERROR: cannot unzip $wgtfile"
@@ -97,6 +100,9 @@ do
echo "DEBUG: fail to unzip"
fi
+ cd $CURDIR
+ rm -r $ZIPOUT
+
echo "DEBUG: list current pkgs"
# TODO mktemp
LIST='list'