🔧 Add an automated tool

This commit is contained in:
Clement Desmidt 2019-12-09 11:58:17 +01:00
parent 40e99b8702
commit 20e2c5c324

19
add.sh Executable file
View File

@ -0,0 +1,19 @@
#!/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