Skip to content

Commit 4a51224

Browse files
update.sh: Add script
This script copies selected files from the STM32CubeWL package (unpacked zip or git clone) into this library as needed. It can be used for the initial copy as well as for later updates.
1 parent 5b7aa2c commit 4a51224

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tools/update.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh -e
2+
3+
if [ ! -d "$1" ] || ! grep STM32CubeWL "$1/Package_license.md" 1>/dev/null 2>/dev/null; then
4+
echo "No argument passed, or is not an extracted STM32CubeWL package directory"
5+
exit 1;
6+
fi
7+
CUBE=$1
8+
ROOT=$(cd $(dirname $0)/.. && pwd)
9+
DEST="$ROOT/src/STM32CubeWL"
10+
11+
rsync -av "$CUBE/Package_license.md" "$DEST/"
12+
rsync -av "$CUBE/Middlewares/Third_Party/LoRaWAN" "$DEST/" --exclude '*_template.[ch]' --exclude "/LoRaWAN/LmHandler/*"
13+
rsync -av "$CUBE/Middlewares/Third_Party/SubGHz_Phy" "$DEST/" --exclude '*_template.[ch]'
14+
rsync -av "$CUBE/Utilities/timer" --exclude '*_template.[ch]' "$DEST/Utilities"
15+
rsync -av "$CUBE/Utilities/misc" "$DEST/Utilities" --include '/misc/stm32_systime.[ch]' --include '/misc/*.html' --include '/misc/*.txt' --exclude '/misc/*'

0 commit comments

Comments
 (0)