From 7401f0ef24b82bc27fb187cb45dff4e8e01fe727 Mon Sep 17 00:00:00 2001 From: Julien Maille Date: Tue, 2 Nov 2021 21:59:00 +0100 Subject: [PATCH] update install.sh with patching --- install.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index d976b6e..fe4de03 100644 --- a/install.sh +++ b/install.sh @@ -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," \ No newline at end of file +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 \ No newline at end of file