Update scripts

This commit is contained in:
Marcel Kapfer (mmk2410) 2015-12-24 17:27:24 +01:00
parent b2d723cb62
commit 95a28acb6a
4 changed files with 66 additions and 0 deletions

0
update-scripts/1-0-0_1-1-0.sh Normal file → Executable file
View file

49
update-scripts/1-0-0_1-2-0.sh Executable file
View file

@ -0,0 +1,49 @@
#!/bin/bash
# Update script for Rangitaki from version 1.0.0 to 1.2.0
echo "Downloading version 1.2.0..."
mkdir ./rbe-new
cd ./rbe-new || exit
wget -c https://github.com/mmk2410/Rangitaki/archive/v1.2.0.zip
unzip v1.2.0.zip
rm v1.2.0.zip
mv ./rangitaki-1.2.0/* ./
rm ./rangitaki-1.2.0
cd ../ || exit
mkdir rbe-tmp
echo "Updating RCC..."
cp ./rcc/password.php ./rbe-tmp/
rm -rf ./rcc
mv ./rbe-new/rcc ./
rm ./rcc/password.php
mv ./rbe-tmp/password.php ./rcc/
echo "Updating ressources..."
rm -rf ./res
mv ./rbe-new/res ./
echo "Updating core..."
rm ./index.php
mv ./rbe-new/index.php ./
echo "Updating themes..."
rm ./themes/material-light.css
mv ./rbe-new/themes/material-light.css ./themes
echo "Creating empty extension directory..."
mkdir ./extensions
echo "Update themes..."
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/
echo "Update config file..."
echo "// pagination: how many articles should be on one page" >> ./config.php
echo "// set to 0 to disable it" >> ./config.php
echo "\$pagination = 0;" >> ./config.php
echo "Update languages..."
rm ./lang/en.php
rm ./lang/de.php
mv ./rbe-new/lang/en.php ./lang/
mv ./rbe-new/lang/de.php ./lang/
echo "Cleaning up..."
rm -rf ./rbe-new
rm -rf ./rbe-tmp
echo "Done!"

0
update-scripts/1-1-0_1-1-1.sh Normal file → Executable file
View file

17
update-scripts/1-1-90_1-2-0.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
# Script for updating Rangitaki 1.1.90 to 1.2.0
echo "Getting the up-to-date version..."
mkdir ./rbe-new
cd ./rbe-new || exit
wget -q -c https://github.com/mmk2410/Rangitaki/archive/v1.2.0.zip
unzip -qq v1.1.2.0.zip
rm v1.2.0.zip
mv ./rangitaki-1.2.0/* ./
rm -rf ./rangitaki-1.2.0
cd ../ || exit
echo "Updating core"
rm ./index.php
mv ./rbe-new/index.php ./
echo "Cleaning up..."
rm -rf ./rbe-new
echo "Done!"