Skip to content

Commit

Permalink
tools/mksdkexport.sh: Add support for tar archive
Browse files Browse the repository at this point in the history
A nuttx-exported file format generated by make export is changed
from .zip to .tar.gz with nuttx update. Make it possible to handle
both file formats.
  • Loading branch information
SPRESENSE committed Nov 7, 2022
1 parent aa35899 commit 4b3acba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sdk/tools/mksdkexport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ fi
TMP_DIR=`mktemp -d`

# Extract exported nuttx archive
unzip -d ${TMP_DIR} ${NUTTX_EXPORT} > /dev/null
if [ ${NUTTX_EXPORT##*.} == "zip" ]; then
unzip -d ${TMP_DIR} ${NUTTX_EXPORT} > /dev/null
else
tar zxf ${NUTTX_EXPORT} -C ${TMP_DIR} > /dev/null
fi

# Change exported file structure
# -- sdk-export
Expand Down

0 comments on commit 4b3acba

Please sign in to comment.