@@ -53,6 +53,7 @@ download_file() {
5353BUILD_DIR=' /tmp/hestiacp-src/'
5454DEB_DIR=" $BUILD_DIR /debs/"
5555INSTALL_DIR=' /usr/local/hestia'
56+ ARCHIVE_DIR=" ${BUILD_DIR} /archive/"
5657
5758# Set command variables
5859branch=$1
@@ -71,6 +72,7 @@ PHP_V='7.3.4'
7172# Create build directories
7273rm -rf $BUILD_DIR
7374mkdir -p $DEB_DIR
75+ mkdir -p $ARCHIVE_DIR
7476
7577# Set package dependencies for compiling
7678SOFTWARE=' build-essential libxml2-dev libz-dev libcurl4-gnutls-dev unzip openssl libssl-dev pkg-config'
@@ -126,13 +128,15 @@ HESTIA_B='true'
126128GIT_REP=' https://raw.githubusercontent.com/hestiacp/hestiacp/' $branch ' /src/deb'
127129
128130# Generate Links for sourcecode
129- HESTIA_ARCHIVE_LINK=' https://github.com/hestiacp/hestiacp/archive/' $branch ' .zip '
131+ HESTIA_ARCHIVE_LINK=' https://github.com/hestiacp/hestiacp/archive/' $branch ' .tar.gz '
130132NGINX=' https://nginx.org/download/nginx-' $NGINX_V ' .tar.gz'
131133OPENSSL=' https://www.openssl.org/source/openssl-' $OPENSSL_V ' .tar.gz'
132134PCRE=' https://ftp.pcre.org/pub/pcre/pcre-' $PCRE_V ' .tar.gz'
133135ZLIB=' https://www.zlib.net/zlib-' $ZLIB_V ' .tar.gz'
134136PHP=' http://de2.php.net/distributions/php-' $PHP_V ' .tar.gz'
135137
138+ # Forward slashes in branchname are replaced with dashes to match foldername in github archive.
139+ branch=$( echo " $branch " | sed ' s/\//-/g' ) ;
136140
137141# ################################################################################
138142#
@@ -327,9 +331,7 @@ if [ "$HESTIA_B" = true ] ; then
327331 mkdir $BUILD_DIR /hestia_$HESTIA_V
328332
329333 # Download and unpack source files
330- download_file $HESTIA_ARCHIVE_LINK
331- unzip -q $branch .zip
332- rm $branch .zip
334+ download_file $HESTIA_ARCHIVE_LINK ' -' ' fresh' | tar xz
333335
334336 # Prepare Deb Package Folder Structure
335337 cd hestia_$HESTIA_V /
@@ -345,7 +347,7 @@ if [ "$HESTIA_B" = true ] ; then
345347 chmod +x postinst
346348
347349 # Move needed directories
348- cd ../.. /hestiacp-$branch
350+ cd $BUILD_DIR /hestiacp-$branch
349351 mv bin func install web ../hestia_$HESTIA_V /usr/local/hestia/
350352
351353 # Set permission
0 commit comments