Skip to content

Commit

Permalink
Add #ifdef USE_WEBSERVER_LOCAL to make_header.sh (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
pzich authored Apr 25, 2024
1 parent 4673cda commit f11c1a4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/make_header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
cat <<EOT >./$1/$2
#pragma once
// Generated from https://github.com/esphome/esphome-webserver
$(if [ -n "$4" ]; then echo "#if USE_WEBSERVER_VERSION == $4"; fi)
$(if [ -n "$4" ]; then
echo "#ifdef USE_WEBSERVER_LOCAL"
echo "#if USE_WEBSERVER_VERSION == $4"
fi)
#include "esphome/core/hal.h"
namespace esphome {
Expand All @@ -15,5 +18,8 @@ cat <<EOT >>./$1/$2
} // namespace $3
} // namespace esphome
$(if [ -n "$4" ]; then echo "#endif"; fi)
$(if [ -n "$4" ]; then
echo "#endif"
echo "#endif"
fi)
EOT

0 comments on commit f11c1a4

Please sign in to comment.