diff options
Diffstat (limited to 'installer/opengnsys_update.sh')
-rwxr-xr-x | installer/opengnsys_update.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 853a47b9..36b3b18c 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -1151,6 +1151,30 @@ function updateClient() fi } +# Update ogClient +function updateOgClient() +{ + local ogclientUrl="https://codeload.github.com/opengnsys/ogClient/zip/$BRANCH" + + echoAndLog "${FUNCNAME}(): downloading ogClient code..." + + if ! (curl "${ogclientUrl}" -o ogclient.zip && \ + unzip -qo ogclient.zip) + then + errorAndLog "${FUNCNAME}(): "\ + "error getting ogClient code from ${ogclientUrl}" + return 1 + fi + if [ -e $INSTALL_TARGET/client/ogClient/cfg/ogclient.json ]; then + rm -f ogClient-"$BRANCH"/cfg/ogclient.json + fi + mv -f "ogClient-$BRANCH" $INSTALL_TARGET/client/ogClient + rm -f ogclient.zip + echoAndLog "${FUNCNAME}(): ogClient code was downloaded and updated" + + return 0 +} + # Comprobar permisos y ficheros. function checkFiles() { @@ -1343,6 +1367,12 @@ if [ $? -ne 0 ]; then exit 1 fi +# Update ogClient +if ! updateOgClient; then + errorAndLog "Error updating ogClient files" + exit 1 +fi + # Comprobar permisos y ficheros. checkFiles |