-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3711593
commit 040b482
Showing
4 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
FILE_PATH="$HOME/.arduino15/packages/adafruit/hardware/samd/1.7.14/cores/arduino/USB/CDC.cpp" | ||
|
||
# Check if the file exists | ||
if [ ! -f "$FILE_PATH" ]; then | ||
echo "Error: File does not exist." | ||
fi | ||
# Read the specific line and check its content | ||
CURRENT_LINE=$(sed -n '258p' "$FILE_PATH") | ||
|
||
if [ "$CURRENT_LINE" != " delay(10);" ]; then | ||
echo "No changes made: line 258 does not match the expected content or has already been modified." | ||
exit 0 | ||
fi | ||
|
||
# Replace the content of line 258 | ||
sed -i '258s/.*/ \/\/delay(10);/' "$FILE_PATH" | ||
|
||
echo "Line 258, a delay(10), has been commented out in: [$FILE_PATH]" |