fix not initialized variable
This commit is contained in:
parent
3185474366
commit
674cb8933f
9
gen.sh
9
gen.sh
|
@ -59,7 +59,7 @@ newdataentry () {
|
||||||
customdir=$(pwd)
|
customdir=$(pwd)
|
||||||
fl=""
|
fl=""
|
||||||
test $# -eq 0 && {
|
test $# -eq 0 && {
|
||||||
>&2 echo "determining entry based on data.xml.\n"
|
>&2 echo "determining issue number based on data.xml.\n"
|
||||||
lastentry=$(cat data.xml |grep -i "<schleuder id="|head -1|cut -d'"' -f2)
|
lastentry=$(cat data.xml |grep -i "<schleuder id="|head -1|cut -d'"' -f2)
|
||||||
newentry=$(( $lastentry + 1 ))
|
newentry=$(( $lastentry + 1 ))
|
||||||
} || {
|
} || {
|
||||||
|
@ -80,6 +80,11 @@ newdataentry () {
|
||||||
# custom teaser xml-text, default: none
|
# custom teaser xml-text, default: none
|
||||||
#~ t)
|
#~ t)
|
||||||
#~ teaser) ;;
|
#~ teaser) ;;
|
||||||
|
# custom fs for files
|
||||||
|
#~ p)
|
||||||
|
#~ pdffs) ;;
|
||||||
|
#~ e)
|
||||||
|
#~ epubfs) ;;
|
||||||
# help text
|
# help text
|
||||||
#~ h)
|
#~ h)
|
||||||
#~ help)
|
#~ help)
|
||||||
|
@ -111,7 +116,7 @@ newdataentry () {
|
||||||
} || { datetime=0; } # remaining arguments should be teaser xml-message.
|
} || { datetime=0; } # remaining arguments should be teaser xml-message.
|
||||||
}
|
}
|
||||||
echo "<schleuder id=\"$newentry\">"
|
echo "<schleuder id=\"$newentry\">"
|
||||||
test $datetime -eq 0 && {
|
test "${datetime}" = "" || test $datetime -eq 0 && {
|
||||||
#~ datetime=$(LANG=en_US.utf8 date -u +"%a %d %b %Y %H:%M") # manual copy of known entries
|
#~ datetime=$(LANG=en_US.utf8 date -u +"%a %d %b %Y %H:%M") # manual copy of known entries
|
||||||
datetime=$(LANG=en_US.utf8 date -u -R |rev|cut -d":" -f2-|rev) # RFC-5322-Format without seconds and TZ
|
datetime=$(LANG=en_US.utf8 date -u -R |rev|cut -d":" -f2-|rev) # RFC-5322-Format without seconds and TZ
|
||||||
} || {
|
} || {
|
||||||
|
|
Loading…
Reference in New Issue