mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 17:35:54 +03:00
23 lines
581 B
Bash
23 lines
581 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
# Generate legacy icons for custom color icons in drawable-anydpi-v24
|
||
|
|
||
|
pushd "$(dirname "$(realpath "$0")")" > /dev/null
|
||
|
|
||
|
desired_accent=`cat vector/src/main/res/values/colors_sc.xml | grep '<color name="accent_sc">' | sed 's|.*>\(.*\)</.*|\1|'`
|
||
|
|
||
|
echo "Hardcode colorAccent to $desired_accent"
|
||
|
|
||
|
for f in vector/src/main/res/drawable-anydpi-v24/*; do
|
||
|
|
||
|
target_file="vector/src/main/res/drawable/$(basename "$f")"
|
||
|
echo "$f -> $target_file"
|
||
|
sed "s|?\(android:\)\?\(attr/\)\?colorAccent|$desired_accent|g" "$f" > "$target_file"
|
||
|
|
||
|
done
|
||
|
|
||
|
|
||
|
popd > /dev/null
|