SPEC-3533: unzip wgt files in a dedicated directory
[src/qa-testdefinitions.git] / common / scripts / application-lifecycle.sh
index 0bdc6d4..0935fd2 100755 (executable)
@@ -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'