Skip to content

Commit

Permalink
Add a variable with a branch selection
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniy-antonyuk committed Oct 7, 2021
1 parent 36f6f54 commit 6d1e1b5
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
11 changes: 10 additions & 1 deletion build/install/OneClickInstall/appserver-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ DOCKER="";
LOCAL_SCRIPTS="false"
HELP="false";
product="appserver"
GIT_BRANCH="develop"

while [ "$1" != "" ]; do
case $1 in
Expand All @@ -46,6 +47,14 @@ while [ "$1" != "" ]; do
shift
fi
;;

-gb | --gitbranch )
if [ "$2" != "" ]; then
PARAMETERS="$PARAMETERS ${1}";
GIT_BRANCH=$2
shift
fi
;;

"-?" | -h | --help )
HELP="true";
Expand Down Expand Up @@ -119,7 +128,7 @@ if [ "$HELP" == "false" ]; then
fi

#DOWNLOAD_URL_PREFIX="http://download.onlyoffice.com/install-appserver/"
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/develop/build/install/OneClickInstall"
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/${GIT_BRANCH}/build/install/OneClickInstall"

if [ "$DOCKER" == "true" ]; then
if [ "$LOCAL_SCRIPTS" == "true" ]; then
Expand Down
11 changes: 10 additions & 1 deletion build/install/OneClickInstall/install-Debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -e
package_sysname="onlyoffice";
DS_COMMON_NAME="onlyoffice";
product="appserver"
GIT_BRANCH="develop"
RES_APP_INSTALLED="is already installed";
RES_APP_CHECK_PORTS="uses ports"
RES_CHECK_PORTS="please, make sure that the ports are free.";
Expand All @@ -20,6 +21,14 @@ while [ "$1" != "" ]; do
shift
fi
;;

-gb | --gitbranch )
if [ "$2" != "" ]; then
PARAMETERS="$PARAMETERS ${1}";
GIT_BRANCH=$2
shift
fi
;;

-ls | --localscripts )
if [ "$2" != "" ]; then
Expand Down Expand Up @@ -56,7 +65,7 @@ if [ $(dpkg-query -W -f='${Status}' curl 2>/dev/null | grep -c "ok installed") -
apt-get install -yq curl;
fi

DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/develop/build/install/OneClickInstall/install-Debian"
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/${GIT_BRANCH}/build/install/OneClickInstall/install-Debian"
if [ "${LOCAL_SCRIPTS}" == "true" ]; then
source install-Debian/bootstrap.sh
else
Expand Down
12 changes: 10 additions & 2 deletions build/install/OneClickInstall/install-RedHat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
package_manager="yum"
package_sysname="onlyoffice";
product="appserver"

GIT_BRANCH="develop"
package_services="";
RES_APP_INSTALLED="is already installed";
RES_APP_CHECK_PORTS="uses ports"
Expand All @@ -32,6 +32,14 @@ while [ "$1" != "" ]; do
fi
;;

-gb | --gitbranch )
if [ "$2" != "" ]; then
PARAMETERS="$PARAMETERS ${1}";
GIT_BRANCH=$2
shift
fi
;;

-ls | --localscripts )
if [ "$2" != "" ]; then
LOCAL_SCRIPTS=$2
Expand Down Expand Up @@ -80,7 +88,7 @@ gpgkey=http://static.teamlab.info.s3.amazonaws.com/k8s
END

#DOWNLOAD_URL_PREFIX="https://download.onlyoffice.com/install-appserver/install-RedHat"
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/develop/build/install/OneClickInstall/install-RedHat"
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/${GIT_BRANCH}/build/install/OneClickInstall/install-RedHat"

if [ "$LOCAL_SCRIPTS" = "true" ]; then
source install-RedHat/bootstrap.sh
Expand Down

0 comments on commit 6d1e1b5

Please sign in to comment.