代码拉取完成,页面将自动刷新
#!/bin/bash
VERSION=$(git describe)
TMP_DIR=`mktemp -d`
if [ $? -eq 0 ]; then
# Make sure coreutils is installed.
# if not, these terrible things may happen:
# https://www.letscontrolit.com/forum/viewtopic.php?f=6&t=8542
echo "Created ${TMP_DIR}"
else
echo "Could not create tmp dir, mktemp -d failed"
exit 1
fi
TMP_DIST=`echo "${TMP_DIR}/ESPEasy_collect_dist"`
mkdir -p ${TMP_DIST}
if [ $? -eq 0 ]; then
echo "Created ${TMP_DIST}"
else
echo "Could not create tmp dir: ${TMP_DIST}"
exit 1
fi
CURPATH=`pwd`
BUILD_LOG=`echo "${TMP_DIST}/buildlog.txt"`
# PIO 3.x :
# BINARY_PATH=".pioenvs"
# PIO 4.0 and newer:
BINARY_PATH=".pio/build"
while getopts d: option
do
case "${option}"
in
d) VERSION=${OPTARG};;
esac
done
if [ ! -d ${TMP_DIST} ]; then
# Could not create temp dir, so exit
exit 1
fi
echo "### Creating zip archives"
#Naming convention:
# ESP_Easy_[github version]_[plugin set]_[chip type]_[flash memory].bin
if [ -d "build_output/reject" ]; then
zip -qq ${CURPATH}/ESPEasy_ELF_files_$VERSION.zip build_output/reject/*
fi
zip -qq ${CURPATH}/ESPEasy_ELF_files_$VERSION.zip build_output/debug/*
echo "### Created ESPEasy_ELF_files_$VERSION.zip"
mkdir -p ${TMP_DIST}
cp -r dist/* ${TMP_DIST}/
if [ -d "docs/build" ]; then
# Docs have been created
zip -r -qq ${CURPATH}/ESPEasy_docs_$VERSION.zip docs/build/*
echo "### Created ESPEasy_docs_$VERSION.zip"
fi
#create a source structure that is the same as the original ESPEasy project (and works with the howto on the wiki)
#rm -rf dist/Source 2>/dev/null
mkdir -p ${TMP_DIST}/source
cp -r lib ${TMP_DIST}/source/
cp -r src ${TMP_DIST}/source/
cp -r misc ${TMP_DIST}/source/
cp -r static ${TMP_DIST}/source/
cp -r tools ${TMP_DIST}/source/
cp platformio*.ini ${TMP_DIST}/source/
cp *.txt ${TMP_DIST}/source/
cp *.csv ${TMP_DIST}/source/
cp README* ${TMP_DIST}/source/
cp -r build_output/bin/* ${TMP_DIST}/bin
rm -f ${TMP_DIST}/bin/*ESP32*
cd ${TMP_DIST}
if [ "$(ls -A ${TMP_DIST}/bin/)" ]; then
echo
zip -qq ${CURPATH}/ESPEasy_ESP82xx_$VERSION.zip -r .
echo "### Created ESPEasy_ESP82xx_$VERSION.zip"
fi
cd ${CURPATH}
rm -f ${TMP_DIST}/bin/*
cp -r build_output/bin/*ESP32* ${TMP_DIST}/bin
cd ${TMP_DIST}
if [ "$(ls -A ${TMP_DIST}/bin/)" ]; then
echo
zip -qq ${CURPATH}/ESPEasy_ESP32_$VERSION.zip -r .
echo "### Created ESPEasy_ESP32_$VERSION.zip"
fi
rm -Rf ${TMP_DIST}/* 2>/dev/null
rmdir ${TMP_DIST}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。