File tree Expand file tree Collapse file tree 1 file changed +21
-12
lines changed
Expand file tree Collapse file tree 1 file changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,28 @@ INSTALL_DIR='/usr/local/hestia'
6464SRC_DIR=" $( cd " $( dirname " $0 " ) /.." && pwd) "
6565ARCHIVE_DIR=" $SRC_DIR /src/archive/"
6666
67+ # Set command variables
68+ if [ ! -z " $2 " ]; then
69+ branch=$2
70+ else
71+ echo -n " Please enter the name of the branch to build from (e.g. master): "
72+ read branch
73+ fi
74+
6775# Set Version for compiling
68- HESTIA_V=' 0.10.0-190430_amd64'
76+ if [ -f " $SRC_DIR /src/deb/hestia/control" ] && [ " $branch " = ' ~localsrc' ]; then
77+ BUILD_VER=$( cat $SRC_DIR /src/deb/hestia/control | grep " Version:" | cut -d' ' -f2)
78+ else
79+ BUILD_VER=$( curl -s https://raw.githubusercontent.com/hestiacp/hestiacp/$branch /src/deb/hestia/control | grep " Version:" | cut -d' ' -f2)
80+ fi
81+
82+ if [ -z " $BUILD_VER " ]; then
83+ echo " Error: Branch invalid, could not detect version"
84+ exit 1
85+ fi
86+
87+ BUILD_ARCH=' amd64'
88+ HESTIA_V=" ${BUILD_VER} _${BUILD_ARCH} "
6989NGINX_V=' 1.17.0'
7090OPENSSL_V=' 1.1.1b'
7191PCRE_V=' 8.43'
@@ -85,17 +105,6 @@ timestamp() {
85105 date +%s
86106}
87107
88- branch=$2
89- install=$3
90-
91- # Set install flags
92- if [ ! -z " $2 " ]; then
93- branch=$2
94- else
95- echo -n " Please enter the name of the branch to build from (e.g. master): "
96- read branch
97- fi
98-
99108if [ ! -z " $3 " ]; then
100109 install=$3
101110else
You can’t perform that action at this time.
0 commit comments