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
|
if [[ ! -e .git ]]; then
|
||||||
echo "Merci de se déplacer dans le répertoire approprié"
|
echo "Merci de se déplacer dans le répertoire approprié"
|
||||||
exit 0
|
exit 0
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
YEAR=$(date +%Y)
|
DAY="$1"
|
||||||
DAY=$(date +%d)
|
YEAR="$2"
|
||||||
FILENAME="${YEAR}/day${DAY}.py"
|
FILENAME="${YEAR}/day${DAY}.py"
|
||||||
|
|
||||||
cp utils/template.py "$FILENAME"
|
cp utils/template.py "$FILENAME"
|
||||||
|
Loading…
Reference in New Issue
Block a user