Better new blog entry

This commit is contained in:
Yann Esposito (Yogsototh) 2010-05-17 14:45:43 +02:00
parent af42182949
commit 6e0ba5f84d

View file

@ -18,7 +18,9 @@ basefilename="$( print $title | perl -pe 'chomp(); s#ç#c#g; s#àâ#a#g; s#éè
# construct the final filename # construct the final filename
yearmonthday=$( date "+%Y-%m-%d" ) yearmonthday=$( date "+%Y-%m-%d" )
linkname="$root/latest.md"
filename="$root/multi/blog/${yearmonthday}-$basefilename.md" filename="$root/multi/blog/${yearmonthday}-$basefilename.md"
[[ ! -d ${filename:h} ]] && mkdir -p ${filename:h}
dirname="$root/output/Scratch/img/blog/${yearmonthday}-${basefilename}" dirname="$root/output/Scratch/img/blog/${yearmonthday}-${basefilename}"
[[ -e $filename ]] && { [[ -e $filename ]] && {
@ -49,5 +51,5 @@ ENDFORMAT
print "imagedir = $dirname" print "imagedir = $dirname"
mkdir $dirname mkdir $dirname
ln -sf $filename $linkname
vi $filename vim $linkname