-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update resources to match DFPlayer code
- Loading branch information
Showing
6 changed files
with
181 additions
and
5 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
compressor="gz" | ||
compress_cmd="" | ||
compress_args="" | ||
|
||
updlocalarchive(){ | ||
local res=$1 | ||
echo "check: $res" | ||
[ ! -f html/${res} ] && return | ||
[ ! -f ../data/${res}.${compressor} ] || [ html/${res} -nt ../data/${res}.${compressor} ] && ${compress_cmd} ${compress_args} -c html/${res} > ../data/${res}.${compressor} && touch -r html/${res} ../data/${res}.${compressor} | ||
} | ||
|
||
compress_cmd=`which gzip` | ||
if [ "x$compress_cmd" = "x" ]; then | ||
echo "ERROR: gzip compressor not found!" | ||
exit 1 | ||
fi | ||
compress_args="-9" | ||
|
||
|
||
|
||
echo "Update local resources" | ||
lamp_files='index.html js/ui_lamp.json favicon.ico css/wp_dark.svg css/wp_light.svg' | ||
for f in ${lamp_files} | ||
do | ||
updlocalarchive $f | ||
done |
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