Skip to content

Commit ca2eb7c

Browse files
update.sh: Update script for importing from github
This script used to look at (and copy) the Package_license.md file to check that a valid STM32CubeWL directory was passed, but this file is only present in zip downloads, not the STM32CubeWL versions released through git. This changes the check to look at package.xml instead, which is present in both. It changes the rsync command to copy LICENSE.md, which is only present in github releases (so some manual work is needed to import zip releases again).
1 parent 4ab25dd commit ca2eb7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/update.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/bin/sh -e
22

3-
if [ ! -d "$1" ] || ! grep STM32CubeWL "$1/Package_license.md" 1>/dev/null 2>/dev/null; then
3+
if [ ! -d "$1" ] || ! grep 'Release="FW.WL' "$1/package.xml" 1>/dev/null 2>/dev/null; then
44
echo "No argument passed, or is not an extracted STM32CubeWL package directory"
55
exit 1;
66
fi
77
CUBE=$1
88
ROOT=$(cd $(dirname $0)/.. && pwd)
99
DEST="$ROOT/src/STM32CubeWL"
1010

11-
rsync -av "$CUBE/Package_license.md" "$DEST/"
11+
rsync -av "$CUBE/LICENSE.md" "$DEST/"
1212
rsync -av "$CUBE/Middlewares/Third_Party/LoRaWAN" "$DEST/" --exclude '*_template.[ch]' --exclude "/LoRaWAN/LmHandler/*"
1313
rsync -av "$CUBE/Middlewares/Third_Party/SubGHz_Phy" "$DEST/" --exclude '*_template.[ch]'
1414
rsync -av "$CUBE/Utilities/timer" --exclude '*_template.[ch]' "$DEST/Utilities"

0 commit comments

Comments
 (0)