-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
3 changed files
with
49 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ captures/ | |
/lib/nonfree-aquestalk/*.a | ||
/data/music/wip*.pomf | ||
/data/music/WIP*.pomf | ||
/webroot/fvudata/* |
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,33 @@ | ||
#!/bin/bash | ||
|
||
# Directory containing the folders to check | ||
source_dir="./.pio/build" | ||
# Target directory for copied files | ||
target_dir="./webroot/fvudata" | ||
|
||
# Create the target directory if it doesn't exist | ||
mkdir -p "$target_dir" | ||
|
||
cp "./.pio/build/music-pomf/littlefs.bin" "$target_dir/fs.bin" | ||
cp "./data/FS_VER" "$target_dir/fs_ver.txt" | ||
|
||
# Iterate over each entry in the source directory | ||
for entry in "$source_dir"/*; do | ||
# Check if the entry is a directory | ||
if [ -d "$entry" ]; then | ||
# Define the path to firmware.bin inside the current directory | ||
firmware_file="$entry/firmware.bin" | ||
|
||
# Check if firmware.bin exists in the current directory | ||
if [ -f "$firmware_file" ]; then | ||
# Get the name of the directory (basename) | ||
folder_name=$(basename "$entry") | ||
|
||
# Copy and rename firmware.bin to the target directory | ||
cp "$firmware_file" "$target_dir/$folder_name.bin" | ||
echo "Copied $firmware_file to $target_dir/$folder_name.bin" | ||
else | ||
echo "No firmware.bin found in $entry" | ||
fi | ||
fi | ||
done |