commit 5b3705d3e235284fae72f2c96c8025101de174d1 Author: Clément Date: Thu Dec 3 12:27:04 2020 +0100 :sparkles: Initialise le repo comme en 2019 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d5a90de --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +input.txt +/.idea \ No newline at end of file diff --git a/add.sh b/add.sh new file mode 100755 index 0000000..8970655 --- /dev/null +++ b/add.sh @@ -0,0 +1,18 @@ +#!/usr/bin/zsh +SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" +NUMBER=$1 + +if [ ! -d "${SCRIPTPATH}/day_${NUMBER}" ]; then + mkdir "${SCRIPTPATH}/day_${NUMBER}" +else + echo "folder ${SCRIPTPATH}/day_${NUMBER} already exists" + exit +fi + +cd "${SCRIPTPATH}/day_${NUMBER}" || exit + +touch input.txt part_1.php part_2.php + +echo "DONE" + +exit \ No newline at end of file