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

Adding update option

parent 94da9b31
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,8 @@ USAGE=$USAGE" Remove any variable:\t\t\t\t\t$0 remove variable\n"
USAGE=$USAGE" If the variable is part of LODSPeaKr, it will return to its default value\n"
USAGE=$USAGE" \n===ADMIN USER===\n"
USAGE=$USAGE" Change password:\t\t\t\t\t$0 change password NEWPASSWORD\n"
USAGE=$USAGE" \n===UPDATE===\n"
USAGE=$USAGE" Update LODSPeaKr:\t\t\t\t\t$0 update\n"
USAGE=$USAGE"\n===VERSION==\n"
USAGE=$USAGE" Version:\t\t\t\t\t\t$0 version\n"
USAGEDEBUG="Usage: $0 debug on|off"
......@@ -41,7 +43,7 @@ if [[ $# -eq 0 || "$1" == "--help" ]]; then
fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
operations=( create delete debug backup restore default cache version enable disable add remove list details change )
operations=( create delete debug backup restore default cache version enable disable add remove list details change update )
currentOperation=
if [[ ${operations[@]} =~ $1 ]]; then
......@@ -325,3 +327,9 @@ if [[ $currentOperation == "change" ]]; then
php $DIR/modules/change-password.php $3
exit
fi
## Update
if [[ $currentOperation == "update" ]]; then
$DIR/modules/update-lodspeakr.sh
exit
fi
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR/../..
GIT=`which git`
if [ -z $GIT ];then
echo "No git found. Aborting"
exit 1
fi
echo Updating LODSPeaKr
$GIT pull -q
if [ "$?" != 0 ];then
echo "Update couldn't finish properly. Stopping further actions"
exit 0
fi
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