Browse Source

Option to specify destination folder for images generated by build.sh script

pull/1155/merge
Xose Pérez 5 years ago
parent
commit
34c195b4c0
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      code/build.sh

+ 7
- 2
code/build.sh View File

@ -10,6 +10,8 @@ is_git() {
}
# Script settings
destination=../firmware
version=$(grep APP_VERSION espurna/config/version.h | awk '{print $3}' | sed 's/"//g')
if is_git; then
@ -104,13 +106,13 @@ build_environments() {
platformio run --silent --environment $environment || exit 1
stat -c %s .pioenvs/$environment/firmware.bin
[[ "${TRAVIS_BUILD_STAGE_NAME}" = "Test" ]] || \
mv .pioenvs/$environment/firmware.bin ../firmware/espurna-$version/espurna-$version-$environment.bin
mv .pioenvs/$environment/firmware.bin $destination/espurna-$version/espurna-$version-$environment.bin
done
echo "--------------------------------------------------------------"
}
# Parameters
while getopts "lp" opt; do
while getopts "lpd:" opt; do
case $opt in
l)
print_available
@ -119,6 +121,9 @@ while getopts "lp" opt; do
p)
par_build=true
;;
d)
destination=$OPTARG
;;
esac
done


Loading…
Cancel
Save