Last active
September 16, 2019 05:33
-
-
Save JedMeister/456cd69fbf7e4d7c92a41f8fad2fc601 to your computer and use it in GitHub Desktop.
customise phpBB theme - TKL v14.x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root, please use sudo" | |
exit 1 | |
fi | |
if [[ -n $1 ]]; then | |
NEW_STYLE=$1 | |
else | |
NEW_STYLE=custom_style | |
fi | |
mkdir -p /etc/phpbb3/styles/$NEW_STYLE | |
cp -r /usr/share/phpbb3/styles/prosilver/* /etc/phpbb3/styles/$NEW_STYLE/ | |
cd /etc/phpbb3/styles/$NEW_STYLE | |
FILES="imageset/imageset.cfg template/template.cfg template/overall_header.html theme/stylesheet.css theme/theme.cfg style.cfg" | |
for file in $FILES; do | |
sed -i "\|name|s|prosilver|$NEW_STYLE|" $file | |
done | |
echo "Your new custom style is named $NEW_STYLE, and can be found in /etc/phpbb3/styles/$NEW_STYLE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment