parent
03d4ec8f78
commit
6916851eec
|
@ -9,9 +9,9 @@ if [ -z "${path_to_rendered_md}" ] || [ ! -f "${path_to_rendered_md}" ]; then
|
|||
fi
|
||||
|
||||
# Get the number for the new issue
|
||||
publications="$(find posts/ -maxdepth 1 -mindepth 1 -type d)"
|
||||
last_date="$(echo "${publications}" | tail -n 1 | cut -d '/' -f 2)"
|
||||
today="$(date +"%Y-%m-%d")"
|
||||
publications="$(find posts/ -maxdepth 1 -mindepth 1 -type d | sort | grep -v "${today}")"
|
||||
last_date="$(echo "${publications}" | tail -n 1 | cut -d '/' -f 2)"
|
||||
current_number="$(echo "${publications}" | grep -v "${today}" | wc -l)"
|
||||
next_number="$(($current_number+1))"
|
||||
|
||||
|
|
Loading…
Reference in a new issue