make/import: support import zip use relative path
mkimport.sh failure if using relative path: $ ./tools/mkimport.sh -x ../incubator-nuttx/nuttx-export-9.1.0.zip unzip: cannot find or open ../incubator-nuttx/nuttx-export-9.1.0.zip, ../incubator-nuttx/nuttx-export-9.1.0.zip.zip or ../incubator-nuttx/nuttx-export-9.1.0.zip.ZIP. ERROR: unzip ../incubator-nuttx/nuttx-export-9.1.0.zip failed Change-Id: Ifc93c5e4dac95ec79a4e909b22ef646fbfe4484d Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
a5bae8b8ee
commit
c723283340
@ -114,19 +114,19 @@ rm -rf ${DALLDIRS}
|
||||
mkdir ${TMPDIR} || \
|
||||
{ echo "ERROR: Failed to create ${TMPDIR}"; exit 1; }
|
||||
|
||||
if [ "X${TGZ}" == "Xy" ]; then
|
||||
tar zxf ${EXPORT} -C ${TMPDIR} || \
|
||||
{ echo "ERROR: tar zxf ${EXPORT} failed"; exit 1; }
|
||||
else
|
||||
unzip ${EXPORT} -d ${TMPDIR} || \
|
||||
{ echo "ERROR: unzip ${EXPORT} failed"; exit 1; }
|
||||
fi
|
||||
|
||||
# Unpack the export package into the temporary directory
|
||||
|
||||
cd ${TMPDIR} || \
|
||||
{ echo "ERROR: Failed to cd to ${TMPDIR}"; exit 1; }
|
||||
|
||||
if [ "X${TGZ}" == "Xy" ]; then
|
||||
tar zxf ${EXPORT} || \
|
||||
{ echo "ERROR: tar zxf ${EXPORT} failed"; exit 1; }
|
||||
else
|
||||
unzip ${EXPORT} || \
|
||||
{ echo "ERROR: unzip ${EXPORT} failed"; exit 1; }
|
||||
fi
|
||||
|
||||
EXPORTDIR=`ls`
|
||||
|
||||
if [ -z "${EXPORTDIR}" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user