forked from q/element-web-patches
adding patch script
This commit is contained in:
commit
4018d403d6
49
code_patches.sh
Executable file
49
code_patches.sh
Executable file
@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo Backing up EmojiProvider.tsx...
|
||||
if [ ! -f ../node_modules/matrix-react-sdk/src/autocomplete/EmojiProvider_backup.tsx ]; then
|
||||
cp ../node_modules/matrix-react-sdk/src/autocomplete/EmojiProvider.tsx ../node_modules/matrix-react-sdk/src/autocomplete/EmojiProvider_backup.tsx
|
||||
else
|
||||
cp ../node_modules/matrix-react-sdk/src/autocomplete/EmojiProvider_backup.tsx ../node_modules/matrix-react-sdk/src/autocomplete/EmojiProvider.tsx
|
||||
fi
|
||||
|
||||
echo Backing up compact.json...
|
||||
if [ ! -f ../node_modules/emojibase-data/en/compact_backup.json ]; then
|
||||
cp ../node_modules/emojibase-data/en/compact.json ../node_modules/emojibase-data/en/compact_backup.json
|
||||
else
|
||||
cp ../node_modules/emojibase-data/en/compact_backup.json ../node_modules/emojibase-data/en/compact.json
|
||||
fi
|
||||
|
||||
echo Adding custom emoji...
|
||||
jq -s -c '.[0] + .[1]' "../node_modules/emojibase-data/en/compact_backup.json" "./emoji.json" > "../node_modules/emojibase-data/en/compact.json"
|
||||
|
||||
|
||||
echo Copying custom login background...
|
||||
cp -f ./lake.jpg ../res/themes/element/img/backgrounds/lake.jpg
|
||||
|
||||
echo Copying custom config.json...
|
||||
cp -f ./config.json ../config.sample.json
|
||||
|
||||
echo Backing up _EmojiPicker.scss...
|
||||
if [ ! -f ../node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.scss.backup ]; then
|
||||
cp ../node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.scss ../node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.scss.backup
|
||||
else
|
||||
cp ../node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.scss.backup ../node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.scss
|
||||
fi
|
||||
|
||||
echo Adding custom emoji picker CSS...
|
||||
echo "
|
||||
.mx_EmojiPicker_item_wrapper {
|
||||
text-overflow: clip;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}" >> ../node_modules/matrix-react-sdk/res/css/views/emojipicker/_EmojiPicker.scss
|
||||
|
||||
|
||||
echo Adding greentext patch...
|
||||
patch "../node_modules/commonmark/dist/commonmark.js" ./greentext.patch
|
||||
|
||||
echo running component index fix...
|
||||
cd ../node_modules/matrix-react-sdk
|
||||
yarn reskindex
|
||||
cd ../../custom
|
Loading…
Reference in New Issue
Block a user