Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2e6dd32

Browse files
jackonellicreativcoder
authored andcommitted
Robuster string parsing in bash script
In the `avrdude` call the elf-file input argument is used:"... -Uflash:w:$1:e".On some systems the "$1:e" is interpreted as the extension of thisargument, i.e. only producing "elf" instead of the full"<path-to_elf.elf>"Adding curly braces "${1]:e" ensures robust parsing.
1 parent522bfe7 commit2e6dd32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎flash.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ if [ "$#" -lt 1 ]; then
1313
fi
1414

1515
sudo -u$USER cargo build
16-
avrdude -q -C/etc/avrdude.conf -patmega328p -carduino -P/dev/ttyACM0 -D"-Uflash:w:$1:e"
16+
avrdude -q -C/etc/avrdude.conf -patmega328p -carduino -P/dev/ttyACM0 -D"-Uflash:w:${1}:e"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp