Skip to content
Snippets Groups Projects
Commit c3f22b1d authored by alvaro's avatar alvaro
Browse files

Ask for backup first

parent 92b76646
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
#Check git
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/../..
GIT=`which git`
......@@ -8,6 +9,19 @@ if [ -z $GIT ];then
exit 1
fi
#Ask for backup
answer_backup=""
while [ "$answer_backup" != "y" -a "$answer_backup" != "n" ]; do
echo -n "Do you want to create a backup of the current installation? [y/n]: "
read -u 1 answer_backup
done
if [ "$answer_backup" = "y" ]; then
echo "Performing backup"
utils/lodspk.sh backup
fi
#Perform git pull
echo Updating LODSPeaKr
$GIT pull -q
if [ "$?" != 0 ];then
......@@ -15,5 +29,7 @@ if [ "$?" != 0 ];then
exit 0
fi
#Update GUI
echo Updating GUI elements
cp -rf doc/examples/originalComponents/static/admin/* components/static/admin/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment