This repository has been archived on 2022-02-10. You can view files and clone it, but cannot push or open issues or pull requests.
rangitaki/update-scripts/1-1-1_1-1-2.sh

37 lines
1.3 KiB
Bash
Raw Normal View History

2015-12-20 21:11:50 +01:00
#!/bin/bash
2015-12-20 21:22:01 +01:00
# Script for updating Rangitaki 1.1.1 to 1.1.2
# WARNING: Rangitaki 1.1.2 is for testing purposes only
2015-12-20 21:11:50 +01:00
echo "WARNING: You're about to install a testing version of Rangitaki."
read -r -p "Do you want to continue? (y/N) " answer
if [[ "$answer" == "y" || "$answer" == "Y" ]]; then
2015-12-20 21:22:01 +01:00
echo "Getting the up-to-date version..."
2015-12-20 21:11:50 +01:00
mkdir ./rbe-new
cd ./rbe-new || exit
2015-12-20 21:22:01 +01:00
wget -q -c https://github.com/mmk2410/Rangitaki/archive/v1.1.2.zip
unzip -qq v1.1.2.zip
2015-12-20 21:11:50 +01:00
rm v1.1.2.zip
mv ./rangitaki-1.1.2/* ./
rm -rf ./rangitaki-1.1.2
cd ../ || exit
2015-12-20 21:22:01 +01:00
echo "Updating ressources..."
2015-12-20 21:11:50 +01:00
rm -rf ./res
mv ./rbe-new/res ./
2015-12-20 21:22:01 +01:00
echo "Updating index.php..."
2015-12-20 21:11:50 +01:00
rm ./index.php
mv ./rbe-new/index.php ./
2015-12-20 21:22:01 +01:00
echo "Update themes..."
2015-12-20 21:11:50 +01:00
rm ./themes/background-img.css
rm ./themes/material-dark.css
rm ./themes/material-light.css
mv ./rbe-new/themes/background-img.css ./themes/
mv ./rbe-new/themes/material-dark.css ./themes/
mv ./rbe-new/themes/material-light.css ./themes/
2015-12-20 21:22:01 +01:00
echo "Update config file..."
2015-12-20 21:11:50 +01:00
echo "// pagination: how many articles should be on one page" >> ./config.php
echo "// set to 0 to disable it" >> ./config.php
2015-12-21 15:52:16 +01:00
echo "\$pagination = 0;" >> ./config.php
2015-12-20 21:22:01 +01:00
echo "Cleaning up..."
2015-12-20 21:11:50 +01:00
rm -rf ./rbe-new
2015-12-20 21:22:01 +01:00
echo "Done!"
2015-12-20 21:11:50 +01:00
fi