update install.sh with patching

This commit is contained in:
Julien Maille 2021-11-02 21:59:00 +01:00
parent a0d18b38f7
commit 7401f0ef24

View file

@ -59,7 +59,11 @@ spicetify config inject_css 1 replace_colors 1 overwrite_assets 1
spicetify apply
echo "PATCHING"
echo "Please add these lines in your config file"
echo " [Patch]"
echo " xpui.js_find_8008=,(\w+=)32,"
echo " xpui.js_repl_8008=,`${1}58,"
PATCH='[Patch]
xpui.js_find_8008 = ,(\\w+=)32,
xpui.js_repl_8008 = ,\${1}58,'
if cat config-xpui.ini | grep -o '\[Patch\]'; then
perl -i -0777 -pe "s/\[Patch\].*?($|(\r*\n){2})/$PATCH\n\n/s" config-xpui.ini
else
echo -e "\n$PATCH" >> config-xpui.ini
fi