-
-
Notifications
You must be signed in to change notification settings - Fork 658
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a script the fixes tha majority of icon uses
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
fixpath="custom_components/waste_collection_schedule/waste_collection_schedule/source/" | ||
|
||
for file in $(git grep --name mdi: -- "$fixpath"); do | ||
echo Trying to fix file $file | ||
sed -i -e 's/"mdi:biohazard"/Icons.ICON_BIOHAZARD/g' $file | ||
sed -i -e 's/"mdi:bottle-wine-outline"/Icons.ICON_CLEAR_GLASS/g' $file | ||
sed -i -e 's/"mdi:bottle-wine"/Icons.ICON_COLORED_GLASS/g' $file | ||
sed -i -e 's/"mdi:food"/Icons.ICON_COMPOST/g' $file | ||
sed -i -e 's/"mdi:desktop-classic"/Icons.ICON_ELECTRONICS/g' $file | ||
sed -i -e 's/"mdi:leaf"/Icons.ICON_GARDEN_WASTE/g' $file | ||
sed -i -e 's/"mdi:trash-can"/Icons.ICON_GENERAL_TRASH/g' $file | ||
sed -i -e 's/"mdi:delete-empty"/Icons.ICON_LANDFILL/g' $file | ||
sed -i -e 's/"mdi:nail"/Icons.ICON_METAL/g' $file | ||
sed -i -e 's/"mdi:newspaper"/Icons.ICON_NEWSPAPER/g' $file | ||
sed -i -e 's/"mdi:package-variant"/Icons.ICON_GENERAL_TRASH/g' $file | ||
sed -i -e 's/"mdi:bottle-soda-classic-outline"/Icons.ICON_PLASTIC/g' $file | ||
sed -i -e 's/"mdi:recycle"/Icons.ICON_RECYCLE/g' $file | ||
done | ||
|
||
echo "" | ||
echo "Now manually make sure that all files have the correct import:" | ||
echo "1. Run \"git status\" to find which filed have been modified" | ||
echo "2. If the file does not contian the following import, add it \"from const import Icons\"" |