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>
+ CURDIR="$(pwd)"
+ ZIPOUT="$(mktemp -d)"
+ cd $ZIPOUT
echo "DEBUG: analyse wgt file"
echo "DEBUG: analyse wgt file"
if [ $? -ne 0 ];then
# TODO Do not fail yet, busybox unzip seems to "fail with success" when checking CRC
echo "ERROR: cannot unzip $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"
echo "DEBUG: fail to unzip"
fi
echo "DEBUG: fail to unzip"
fi
+ cd $CURDIR
+ rm -r $ZIPOUT
+
echo "DEBUG: list current pkgs"
# TODO mktemp
LIST='list'
echo "DEBUG: list current pkgs"
# TODO mktemp
LIST='list'