commit e98ff431dc3cb4e36ae59bf5e116da1eccdbd584 Author: Clement Desmidt Date: Mon Dec 2 09:46:43 2024 +0100 :tada: Init repo diff --git a/add b/add new file mode 100755 index 0000000..df5c3ec --- /dev/null +++ b/add @@ -0,0 +1,19 @@ +#!/usr/bin/zsh + +SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )" +NUMBER=$1 + +if [ ! -d "${SCRIPT_PATH}/day_${NUMBER}" ]; then + mkdir "${SCRIPT_PATH}/day_${NUMBER}" +else + echo "folder ${SCRIPT_PATH}/day_${NUMBER} already exists" + exit +fi + +cd "${SCRIPT_PATH}/day_${NUMBER}" || exit + +touch input.txt part_1.php part_2.php + +echo "DONE" + +exit