From deeb827e9a8388c2a4b29b0987ca25716b2f87bc Mon Sep 17 00:00:00 2001 From: polytan02 Date: Fri, 24 Feb 2017 16:35:05 +0000 Subject: [PATCH] Download sources and check md5 instead of clone git rep --- scripts/install | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index c03831d..cf2d4d5 100644 --- a/scripts/install +++ b/scripts/install @@ -63,7 +63,14 @@ fi # Copy files to the right place final_path=/var/www/$app -sudo git clone https://github.com/abantecart/abantecart-src.git /var/www/$app + +# We download the sources and check the md5sum +SFILE=`sudo cat ../sources/source_file`; +sudo wget -nv -i ../sources/source_url -O ${SFILE}.tar.gz +sudo md5sum -c ../sources/source_md5 --status || (echo "Corrupt source" >&2 && false) +sudo tar xvf ${SFILE}.tar.gz -C ../sources/ +sudo cp -a ../sources/abantecart-src-master/. $final_path + sudo rm -rf $final_path/tests sudo rm -rf $final_path/install.txt sudo mv $final_path/public_html/* $final_path/