Import Compound scripts from project https://github.com/element-hq/compound-android
This commit is contained in:
parent
17b6b08926
commit
b2bb4dcee3
2 changed files with 158 additions and 0 deletions
38
tools/compound/import_tokens.sh
Executable file
38
tools/compound/import_tokens.sh
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
SHORT=b,:
|
||||
LONG=branch,:
|
||||
BRANCH='main'
|
||||
|
||||
while getopts b: flag
|
||||
do
|
||||
case "${flag}" in
|
||||
b) BRANCH=${OPTARG};;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "Branch used: $BRANCH"
|
||||
|
||||
echo "Cloning the compound-design-tokens repository..."
|
||||
if [ -d tmp ]; then
|
||||
echo "Deleting tmp folder..."
|
||||
rm -rf tmp
|
||||
fi
|
||||
mkdir tmp
|
||||
pushd tmp
|
||||
git clone --branch $BRANCH https://github.com/vector-im/compound-design-tokens
|
||||
|
||||
echo "Copying files from tokens repository..."
|
||||
cp -R compound-design-tokens/assets/android/res/drawable ../compound/src/main/res/
|
||||
cp -R compound-design-tokens/assets/android/src/* ../compound/src/main/kotlin/io/element/android/compound/tokens/generated/
|
||||
popd
|
||||
|
||||
echo "Adding autoMirrored attribute..."
|
||||
python3 ./scripts/addAutoMirrored.py
|
||||
|
||||
echo "Removing temporary files..."
|
||||
rm -rf tmp
|
||||
|
||||
echo "Done!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue