From ae81a146dfbc942fcbcb94ae4a2e07555bbd51bf Mon Sep 17 00:00:00 2001 From: untypequicode Date: Wed, 30 Oct 2024 02:46:25 +0100 Subject: [PATCH] =?UTF-8?q?Changement=20du=20syst=C3=A8me=20de=20r=C3=A9cu?= =?UTF-8?q?p=C3=A9ration=20de=20l'image=20de=20strapi=20et=20du=20repo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install-strapi.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/install-strapi.sh b/install-strapi.sh index 4b2e5ec..ddd6007 100755 --- a/install-strapi.sh +++ b/install-strapi.sh @@ -3,11 +3,19 @@ if command -v docker &> /dev/null; then if ! [ -d "/home/$USER/docker/strapi" ]; then read -p "Voulez-vous installer strapi dans le répertoire docker ? (o/n) " response if [[ $response =~ ^[Oo]$ ]]; then - git clone https://ganesh.turing.untypequicode.fr/untypequicode/strapi.git /home/$USER/docker/strapi - cd /home/$USER/docker/strapi + cd /home/$USER/docker + curl -o strapi.zip https://ganesh.turing.untypequicode.fr/untypequicode/strapi/archive/v0.1.zip + if command -v unzip &> /dev/null; then + unzip strapi.zip + else + apt-get install unzip + unzip strapi.zip + fi + rm strapi.zip + cd strapi read -p "Voulez-vous installer l'image déjà compilée ? (o/n) " response if [[ $response =~ ^[Oo]$ ]]; then - curl -o strapi.tar https://ganesh.turing.untypequicode.fr/untypequicode/script-vps/raw/branch/main/strapi.tar + curl -O https://ganesh.turing.untypequicode.fr/untypequicode/script-vps/raw/branch/main/strapi.tar docker load -i strapi.tar rm strapi.tar else