2019-09-11 11:23:03 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
themeName="$1"
|
|
|
|
|
|
|
|
if [ ! -f epicyon-profile.css ]; then
|
|
|
|
echo 'Run this in your Epicyon install directory'
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "$themeName" == 'default' ]]; then
|
2019-09-11 19:42:07 +00:00
|
|
|
if [ -f config.json ]; then
|
|
|
|
if grep -q '"theme"' config.json; then
|
|
|
|
sed -i '/"theme"/d' config.json
|
|
|
|
fi
|
|
|
|
fi
|
2019-09-11 11:23:03 +00:00
|
|
|
if [ -f epicyon.css ]; then
|
|
|
|
rm epicyon.css
|
|
|
|
fi
|
|
|
|
if [ -f login.css ]; then
|
|
|
|
rm login.css
|
|
|
|
fi
|
|
|
|
if [ -f follow.css ]; then
|
|
|
|
rm follow.css
|
|
|
|
fi
|
|
|
|
if [ -f suspended.css ]; then
|
|
|
|
rm suspended.css
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "$themeName" == 'purple'* ]]; then
|
2019-09-11 19:42:07 +00:00
|
|
|
if [ -f config.json ]; then
|
|
|
|
if grep -q '"theme"' config.json; then
|
|
|
|
sed -i '/"theme"/d' config.json
|
|
|
|
fi
|
|
|
|
fi
|
2019-09-11 11:23:03 +00:00
|
|
|
cp epicyon-profile.css epicyon.css
|
|
|
|
filename=epicyon.css
|
|
|
|
sed -i "s|--main-bg-color:.*|--main-bg-color: #1f152d;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-reply:.*|--main-bg-color-reply: #1a142d;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-report:.*|--main-bg-color-report: #12152d;|g" "$filename"
|
|
|
|
sed -i "s|--main-header-color-roles:.*|--main-header-color-roles: #1f192d;|g" "$filename"
|
|
|
|
sed -i "s|--main-fg-color:.*|--main-fg-color: #f98bb0;|g" "$filename"
|
|
|
|
sed -i "s|--border-color:.*|--border-color: #3f2145;|g" "$filename"
|
|
|
|
sed -i "s|--main-link-color:.*|--main-link-color: #ff42a0;|g" "$filename"
|
|
|
|
sed -i "s|--main-visited-color:.*|--main-visited-color: #f93bb0;|g" "$filename"
|
|
|
|
cp epicyon-login.css login.css
|
|
|
|
filename=login.css
|
|
|
|
sed -i "s|--main-bg-color:.*|--main-bg-color: #1f152d;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-reply:.*|--main-bg-color-reply: #1a142d;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-report:.*|--main-bg-color-report: #12152d;|g" "$filename"
|
|
|
|
sed -i "s|--main-header-color-roles:.*|--main-header-color-roles: #1f192d;|g" "$filename"
|
|
|
|
sed -i "s|--main-fg-color:.*|--main-fg-color: #f98bb0;|g" "$filename"
|
|
|
|
sed -i "s|--border-color:.*|--border-color: #3f2145;|g" "$filename"
|
|
|
|
sed -i "s|--main-link-color:.*|--main-link-color: #ff42a0;|g" "$filename"
|
|
|
|
sed -i "s|--main-visited-color:.*|--main-visited-color: #f93bb0;|g" "$filename"
|
2019-09-11 11:50:36 +00:00
|
|
|
cp epicyon-follow.css follow.css
|
|
|
|
filename=follow.css
|
|
|
|
sed -i "s|--main-bg-color:.*|--main-bg-color: #1f152d;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-reply:.*|--main-bg-color-reply: #1a142d;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-report:.*|--main-bg-color-report: #12152d;|g" "$filename"
|
|
|
|
sed -i "s|--main-header-color-roles:.*|--main-header-color-roles: #1f192d;|g" "$filename"
|
|
|
|
sed -i "s|--main-fg-color:.*|--main-fg-color: #f98bb0;|g" "$filename"
|
|
|
|
sed -i "s|--border-color:.*|--border-color: #3f2145;|g" "$filename"
|
|
|
|
sed -i "s|--main-link-color:.*|--main-link-color: #ff42a0;|g" "$filename"
|
|
|
|
sed -i "s|--main-visited-color:.*|--main-visited-color: #f93bb0;|g" "$filename"
|
|
|
|
cp epicyon-suspended.css suspended.css
|
|
|
|
filename=suspended.css
|
|
|
|
sed -i "s|--main-bg-color:.*|--main-bg-color: #1f152d;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-reply:.*|--main-bg-color-reply: #1a142d;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-report:.*|--main-bg-color-report: #12152d;|g" "$filename"
|
|
|
|
sed -i "s|--main-header-color-roles:.*|--main-header-color-roles: #1f192d;|g" "$filename"
|
|
|
|
sed -i "s|--main-fg-color:.*|--main-fg-color: #f98bb0;|g" "$filename"
|
|
|
|
sed -i "s|--border-color:.*|--border-color: #3f2145;|g" "$filename"
|
|
|
|
sed -i "s|--main-link-color:.*|--main-link-color: #ff42a0;|g" "$filename"
|
|
|
|
sed -i "s|--main-visited-color:.*|--main-visited-color: #f93bb0;|g" "$filename"
|
2019-09-11 11:23:03 +00:00
|
|
|
fi
|
2019-09-11 11:43:49 +00:00
|
|
|
|
|
|
|
if [[ "$themeName" == 'hack'* || "$themeName" == 'hax'* ]]; then
|
2019-09-11 19:42:07 +00:00
|
|
|
if [ -f config.json ]; then
|
|
|
|
if grep -q '"theme"' config.json; then
|
2019-09-11 19:43:51 +00:00
|
|
|
sed -i 's|"theme".*|"theme": "hacker",|g' config.json
|
2019-09-11 19:42:07 +00:00
|
|
|
else
|
2019-09-11 19:43:51 +00:00
|
|
|
sed -i '/"admin"/a "theme": "hacker",' config.json
|
2019-09-11 19:42:07 +00:00
|
|
|
sed -i 's|"theme"| "theme"|g' config.json
|
|
|
|
fi
|
|
|
|
fi
|
2019-09-11 11:43:49 +00:00
|
|
|
cp epicyon-profile.css epicyon.css
|
|
|
|
filename=epicyon.css
|
|
|
|
sed -i "s|--main-bg-color:.*|--main-bg-color: black;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-reply:.*|--main-bg-color-reply: #030202;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-report:.*|--main-bg-color-report: #050202;|g" "$filename"
|
|
|
|
sed -i "s|--main-header-color-roles:.*|--main-header-color-roles: #1f192d;|g" "$filename"
|
|
|
|
sed -i "s|--main-fg-color:.*|--main-fg-color: green;|g" "$filename"
|
|
|
|
sed -i "s|--border-color:.*|--border-color: darkgreen;|g" "$filename"
|
|
|
|
sed -i "s|--main-link-color:.*|--main-link-color: #266020;|g" "$filename"
|
|
|
|
sed -i "s|--main-visited-color:.*|--main-visited-color: #3c8234;|g" "$filename"
|
2019-09-11 20:04:18 +00:00
|
|
|
sed -i "s|--time-color:.*|--time-color: green;|g" "$filename"
|
2019-09-11 20:17:22 +00:00
|
|
|
sed -i "s|--button-selected:.*|--button-selected: #060200;|g" "$filename"
|
|
|
|
sed -i "s|--button-background:.*|--button-background: #062200;|g" "$filename"
|
|
|
|
sed -i "s|--button-text:.*|--button-text: green;|g" "$filename"
|
2019-09-11 11:43:49 +00:00
|
|
|
sed -i "s|font-family:.*|font-family: Courier;|g" "$filename"
|
2019-09-11 12:08:03 +00:00
|
|
|
sed -i "s|background-color: #554;|background-color: #062200;|g" "$filename"
|
2019-09-11 12:05:47 +00:00
|
|
|
sed -i "s|color: #FFFFFE;|color: green;|g" "$filename"
|
2019-09-11 11:43:49 +00:00
|
|
|
cp epicyon-login.css login.css
|
|
|
|
filename=login.css
|
|
|
|
sed -i "s|--main-bg-color:.*|--main-bg-color: black;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-reply:.*|--main-bg-color-reply: #030202;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-report:.*|--main-bg-color-report: #050202;|g" "$filename"
|
|
|
|
sed -i "s|--main-header-color-roles:.*|--main-header-color-roles: #1f192d;|g" "$filename"
|
|
|
|
sed -i "s|--main-fg-color:.*|--main-fg-color: green;|g" "$filename"
|
|
|
|
sed -i "s|--border-color:.*|--border-color: darkgreen;|g" "$filename"
|
|
|
|
sed -i "s|--main-link-color:.*|--main-link-color: #266020;|g" "$filename"
|
|
|
|
sed -i "s|--main-visited-color:.*|--main-visited-color: #3c8234;|g" "$filename"
|
|
|
|
sed -i "s|font-family:.*|font-family: Courier;|g" "$filename"
|
2019-09-11 12:08:03 +00:00
|
|
|
sed -i "s|background-color: #554;|background-color: #062200;|g" "$filename"
|
2019-09-11 12:05:47 +00:00
|
|
|
sed -i "s|color: #FFFFFE;|color: green;|g" "$filename"
|
2019-09-11 11:50:36 +00:00
|
|
|
cp epicyon-follow.css follow.css
|
|
|
|
filename=follow.css
|
|
|
|
sed -i "s|--main-bg-color:.*|--main-bg-color: black;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-reply:.*|--main-bg-color-reply: #030202;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-report:.*|--main-bg-color-report: #050202;|g" "$filename"
|
|
|
|
sed -i "s|--main-header-color-roles:.*|--main-header-color-roles: #1f192d;|g" "$filename"
|
|
|
|
sed -i "s|--main-fg-color:.*|--main-fg-color: green;|g" "$filename"
|
|
|
|
sed -i "s|--border-color:.*|--border-color: darkgreen;|g" "$filename"
|
|
|
|
sed -i "s|--main-link-color:.*|--main-link-color: #266020;|g" "$filename"
|
|
|
|
sed -i "s|--main-visited-color:.*|--main-visited-color: #3c8234;|g" "$filename"
|
|
|
|
sed -i "s|font-family:.*|font-family: Courier;|g" "$filename"
|
2019-09-11 12:08:03 +00:00
|
|
|
sed -i "s|background-color: #554;|background-color: #062200;|g" "$filename"
|
2019-09-11 12:05:47 +00:00
|
|
|
sed -i "s|color: #FFFFFE;|color: green;|g" "$filename"
|
2019-09-11 11:50:36 +00:00
|
|
|
cp epicyon-suspended.css suspended.css
|
|
|
|
filename=suspended.css
|
|
|
|
sed -i "s|--main-bg-color:.*|--main-bg-color: black;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-reply:.*|--main-bg-color-reply: #030202;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-report:.*|--main-bg-color-report: #050202;|g" "$filename"
|
|
|
|
sed -i "s|--main-header-color-roles:.*|--main-header-color-roles: #1f192d;|g" "$filename"
|
|
|
|
sed -i "s|--main-fg-color:.*|--main-fg-color: green;|g" "$filename"
|
|
|
|
sed -i "s|--border-color:.*|--border-color: darkgreen;|g" "$filename"
|
|
|
|
sed -i "s|--main-link-color:.*|--main-link-color: #266020;|g" "$filename"
|
|
|
|
sed -i "s|--main-visited-color:.*|--main-visited-color: #3c8234;|g" "$filename"
|
|
|
|
sed -i "s|font-family:.*|font-family: Courier;|g" "$filename"
|
2019-09-11 12:08:03 +00:00
|
|
|
sed -i "s|background-color: #554;|background-color: #062200;|g" "$filename"
|
2019-09-11 12:05:47 +00:00
|
|
|
sed -i "s|color: #FFFFFE;|color: green;|g" "$filename"
|
2019-09-11 11:43:49 +00:00
|
|
|
fi
|
2019-09-11 14:20:01 +00:00
|
|
|
|
|
|
|
if [[ "$themeName" == 'light'* ]]; then
|
2019-09-11 19:42:07 +00:00
|
|
|
if [ -f config.json ]; then
|
|
|
|
if grep -q '"theme"' config.json; then
|
|
|
|
sed -i '/"theme"/d' config.json
|
|
|
|
fi
|
|
|
|
fi
|
2019-09-11 14:20:01 +00:00
|
|
|
cp epicyon-profile.css epicyon.css
|
|
|
|
filename=epicyon.css
|
|
|
|
sed -i "s|--main-bg-color:.*|--main-bg-color: #e6ebf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-reply:.*|--main-bg-color-reply: #e0dbf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-report:.*|--main-bg-color-report: #e3dbf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-header-color-roles:.*|--main-header-color-roles: #ebebf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-fg-color:.*|--main-fg-color: #2d2c37;|g" "$filename"
|
|
|
|
sed -i "s|--border-color:.*|--border-color: #c0cdd9;|g" "$filename"
|
|
|
|
sed -i "s|--main-link-color:.*|--main-link-color: #2a2c37;|g" "$filename"
|
|
|
|
sed -i "s|--main-visited-color:.*|--main-visited-color: #232c37;|g" "$filename"
|
2019-09-11 14:22:27 +00:00
|
|
|
sed -i "s|background-color: #554;|background-color: white;|g" "$filename"
|
2019-09-11 14:20:01 +00:00
|
|
|
sed -i "s|color: #FFFFFE;|color: black;|g" "$filename"
|
|
|
|
cp epicyon-login.css login.css
|
|
|
|
filename=login.css
|
|
|
|
sed -i "s|--main-bg-color:.*|--main-bg-color: #e6ebf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-reply:.*|--main-bg-color-reply: #e0dbf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-report:.*|--main-bg-color-report: #e3dbf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-header-color-roles:.*|--main-header-color-roles: #ebebf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-fg-color:.*|--main-fg-color: #2d2c37;|g" "$filename"
|
|
|
|
sed -i "s|--border-color:.*|--border-color: #c0cdd9;|g" "$filename"
|
|
|
|
sed -i "s|--main-link-color:.*|--main-link-color: #2a2c37;|g" "$filename"
|
|
|
|
sed -i "s|--main-visited-color:.*|--main-visited-color: #232c37;|g" "$filename"
|
2019-09-11 14:22:27 +00:00
|
|
|
sed -i "s|background-color: #554;|background-color: white;|g" "$filename"
|
2019-09-11 14:20:01 +00:00
|
|
|
sed -i "s|color: #FFFFFE;|color: black;|g" "$filename"
|
|
|
|
cp epicyon-follow.css follow.css
|
|
|
|
filename=follow.css
|
|
|
|
sed -i "s|--main-bg-color:.*|--main-bg-color: #e6ebf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-reply:.*|--main-bg-color-reply: #e0dbf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-report:.*|--main-bg-color-report: #e3dbf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-header-color-roles:.*|--main-header-color-roles: #ebebf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-fg-color:.*|--main-fg-color: #2d2c37;|g" "$filename"
|
|
|
|
sed -i "s|--border-color:.*|--border-color: #c0cdd9;|g" "$filename"
|
|
|
|
sed -i "s|--main-link-color:.*|--main-link-color: #2a2c37;|g" "$filename"
|
|
|
|
sed -i "s|--main-visited-color:.*|--main-visited-color: #232c37;|g" "$filename"
|
2019-09-11 14:22:27 +00:00
|
|
|
sed -i "s|background-color: #554;|background-color: white;|g" "$filename"
|
2019-09-11 14:20:01 +00:00
|
|
|
sed -i "s|color: #FFFFFE;|color: black;|g" "$filename"
|
|
|
|
cp epicyon-suspended.css suspended.css
|
|
|
|
filename=suspended.css
|
|
|
|
sed -i "s|--main-bg-color:.*|--main-bg-color: #e6ebf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-reply:.*|--main-bg-color-reply: #e0dbf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-bg-color-report:.*|--main-bg-color-report: #e3dbf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-header-color-roles:.*|--main-header-color-roles: #ebebf0;|g" "$filename"
|
|
|
|
sed -i "s|--main-fg-color:.*|--main-fg-color: #2d2c37;|g" "$filename"
|
|
|
|
sed -i "s|--border-color:.*|--border-color: #c0cdd9;|g" "$filename"
|
|
|
|
sed -i "s|--main-link-color:.*|--main-link-color: #2a2c37;|g" "$filename"
|
|
|
|
sed -i "s|--main-visited-color:.*|--main-visited-color: #232c37;|g" "$filename"
|
2019-09-11 14:22:27 +00:00
|
|
|
sed -i "s|background-color: #554;|background-color: white;|g" "$filename"
|
2019-09-11 14:20:01 +00:00
|
|
|
sed -i "s|color: #FFFFFE;|color: black;|g" "$filename"
|
|
|
|
fi
|