diff --git a/cleanAll b/cleanAll index eb42fc3..ff1234c 100755 --- a/cleanAll +++ b/cleanAll @@ -1,5 +1,10 @@ #!/bin/bash +# Suppression : +# - des archives générées +# - des fichiers compilés +# - de la Javadoc générée + rm -f *.tar.gz rm -rf bin/* rm -rf docs/* \ No newline at end of file diff --git a/compile b/compile index 1188626..671e1d6 100755 --- a/compile +++ b/compile @@ -1,7 +1,9 @@ #!/bin/bash +# Clean le projet ./cleanAll +# Compilation du projet echo "Compiling into bin/ folder" javac -d bin/ src/*.java echo "Done!" \ No newline at end of file diff --git a/genDeliverable b/genDeliverable index ed9d1c1..53ca773 100644 --- a/genDeliverable +++ b/genDeliverable @@ -1,12 +1,13 @@ #!/bin/bash +# Clean le projet ./cleanAll +# Récupération des dernières sources du projet echo "Récupération de la dernière version du projet" git pull --quiet +# Création de l'archive echo "Creating archive..." - tar -cf BAUMARD-MAQUENNE.tar.gz ./docs ./src ./bin ./compile ./genDoc ./cleanAll ./hello ./runTests ./README.md - echo "Archive created with success!" \ No newline at end of file diff --git a/genDoc b/genDoc index 08c0475..e76858e 100755 --- a/genDoc +++ b/genDoc @@ -1,7 +1,6 @@ #!/bin/bash +# Génération de la Javadoc echo "Generating javadoc into /docs folder" - javadoc -d ./docs -quiet ./src/*.java -Xdoclint:none - echo "Done!" \ No newline at end of file diff --git a/hello b/hello index 34f3864..efe5ce1 100644 --- a/hello +++ b/hello @@ -1,8 +1,15 @@ #!/bin/bash +# Création du dossier 'bin' si inexistant +if [ ! -d "bin" ]; then + echo "Directory 'bin' does not exist. Creating it..." + mkdir bin +fi + +# Compilation du code ./compile -# shellcheck disable=SC2164 -cd bin -java HelloWorld Jordan -java HelloWorld Mathis \ No newline at end of file +cd bin || exit + +# Exécution du programme +java HelloWorld \ No newline at end of file diff --git a/runTests b/runTests index 0e92af8..0a7a08b 100644 --- a/runTests +++ b/runTests @@ -1,18 +1,21 @@ #!/bin/bash +# Création du dossier 'bin' si inexistant if [ ! -d "bin" ]; then echo "Directory 'bin' does not exist. Creating it..." mkdir bin fi +# Compilation du code ./compile cd bin || exit -args=("Jordan" "Mathis" "Billy" "Fanch") - echo "Running tests..." +# Exécution des tests +args=("Jordan" "Mathis" "Billy" "Fanch") + for arg in "${args[@]}"; do java HelloWorld "$arg" done