Update new_day.sh
This commit is contained in:
parent
3dd31b7a37
commit
7216a7ed87
@ -1,10 +1,13 @@
|
||||
[[ $1 ]] | set -- $(date +%d)
|
||||
[[ $2 ]] | set -- $(date +%Y)
|
||||
|
||||
if [[ ! -e .git ]]; then
|
||||
echo "Merci de se déplacer dans le répertoire approprié"
|
||||
exit 0
|
||||
fi;
|
||||
|
||||
YEAR=$(date +%Y)
|
||||
DAY=$(date +%d)
|
||||
DAY="$1"
|
||||
YEAR="$2"
|
||||
FILENAME="${YEAR}/day${DAY}.py"
|
||||
|
||||
cp utils/template.py "$FILENAME"
|
||||
|
Loading…
Reference in New Issue
Block a user