diff --git a/install.sh b/install.sh index c49664d..36857ea 100644 --- a/install.sh +++ b/install.sh @@ -3,8 +3,41 @@ echo "=> Début de l'installation :" +echo "=> Valider les dépendences pour l'installation :" +# curl, zip +# Vérifie si wget est installé +if ! hash wget 2>/dev/null; then + echo "wget n'est pas installé. Veuillez l'installer." + exit 1 +fi + +# Vérifie si zip est installé +if ! hash zip 2>/dev/null; then + echo "zip n'est pas installé. Veuillez l'installer." + exit 1 +fi + # download scut-.zip +wget -q https://git.bcmaison.cf/Outils/scut-reminder/raw/branch/main/scut-latest.zip + +# Vérifie le code de retour de wget +if [ $? -eq 0 ]; then + echo "Téléchargement réussi!" +else + echo "Erreur lors du téléchargement." + exit 1 +fi + +# Vérifie que le fichier a bien été téléchargé +if [ -f "scut-latest.zip" ]; then + echo "Fichier scut-latest.zip téléchargé avec succès." +else + echo "Échec du téléchargement du fichier scut-latest.zip." + exit 1 +fi + + # unzip scut-.zip in ~/.config/scut/ diff --git a/package.sh b/package.sh index 6a0bf72..49536a0 100755 --- a/package.sh +++ b/package.sh @@ -7,4 +7,7 @@ go build scut.go zip -r scut.zip scut README.md configuration # Renommer l'archive -mv scut.zip scut-latest.zip \ No newline at end of file +mv scut.zip scut-latest.zip + +# création du fichier checksum +sha256sum scut-latest.zip > scut-latest.zip.sha256 \ No newline at end of file diff --git a/scut-latest.zip b/scut-latest.zip index bc4435e..0041451 100644 Binary files a/scut-latest.zip and b/scut-latest.zip differ diff --git a/scut-latest.zip.1 b/scut-latest.zip.1 new file mode 100644 index 0000000..bc4435e Binary files /dev/null and b/scut-latest.zip.1 differ diff --git a/scut-latest.zip.2 b/scut-latest.zip.2 new file mode 100644 index 0000000..bc4435e Binary files /dev/null and b/scut-latest.zip.2 differ diff --git a/scut-latest.zip.sha256 b/scut-latest.zip.sha256 new file mode 100644 index 0000000..60c3177 --- /dev/null +++ b/scut-latest.zip.sha256 @@ -0,0 +1 @@ +885ee1aea255a38c3876e1f37a9a8c2c0a7104e48ffbe6e1a4eac759769436bb scut-latest.zip