Update Script for 1.3.0

This commit is contained in:
mmk2410 2016-02-16 14:15:56 +01:00
parent c9279b8f1d
commit bd28332252

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

@ -0,0 +1,55 @@
#!/bin/bash
# Update script for Rangitaki from version 1.2.1 to 1.3.0
version="1.3.0"
tmp="./rbe-tmp"
new="./rbe-new"
conf="./config.php"
echo "Downloading version $version from GitHub..."
mkdir $new
cd $new || exit
wget -c https://github.com/mmk2410/Rangitaki/archive/"$version".zip
echo "Extracting"
unzip v"$version".zip
rm v"$version".zip
mv ./rangitaki-"$version"/* ./
rm ./rangitaki-"$version"
cd ../ || exit
mkdir $tmp
echo "Updating ressources..."
rm -rf ./res/php/
mv $new/res/php ./res/
echo "Updating RCC..."
cp ./rcc/password.php $tmp
rm -rf ./rcc
mv $new/rcc ./
rm ./rcc/password.php
mv $tmp/password.php ./rcc/
echo "Updating core..."
rm ./index.php
mv $new/index.php ./
echo "Preparing composer..."
mv $new/vendor ./
mv $new/composer.lock ./
mv $new/composer.json ./
echo "Creating empty feeds directory..."
mkdir ./feed
echo "Cleaning up..."
rm -rf $new
rm -rf $tmp
echo "Update config file..."
echo "// Blog URL - set here the url of your blog" >> $conf
echo -n 'Enter the blog URL:'
read -r url
echo "\$blogurl = \"$url\";" >> $conf
echo "Your Rangitaki installation is updated to version $version"