small fix - theedge

Auke Kok sofar at lunar-linux.org
Fri Apr 16 12:35:34 GMT 2004


merged (theedge)

sofar


Chad Kittel wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>I know tchan will think I'm crazy and probably think it's pointless, but I'm 
>gunna submit it anyway because I'm anal like that :o) Anyhow... if you do a 
>'lvu newer/older X' and let X be anything other than a number that falls in 
>the predefined range in the newer() and older() function you get a infinate 
>loop of something like "/bin/lvu: line 320: [: JUNKVALUE: integer expression 
>expected", that you have to Ctrl+C out of.  Below is a patch to fix that.  
>This was against theedge dated 20040416.
>
>@@ -304,7 +304,10 @@
>
>
> newer()  {
>- -  [ -z "$1" ] && return 1
>+  [ -z "$1" ] && return 1
>+  if [ ! -z `echo $1 | sed 's/[[:digit:]]//g'` ] ; then
>+    return 1
>+  fi
>   DATE=$1
>   [ "$DATE" -lt "20010101" ] && return 1
>   [ "$DATE" -gt "20310101" ] && return 1
>@@ -318,7 +321,10 @@
>
>
> older()  {
>- -  [ -z "$1" ] && return 1
>+  [ -z "$1" ] && return 1
>+  if [ ! -z `echo $1 | sed 's/[[:digit:]]//g'` ] ; then
>+    return 1
>+  fi
>   DATE=$1
>   [ "$DATE" -lt "20010101" ] && return 1
>   [ "$DATE" -gt "20310101" ] && return 1
>
>- - v3rt1g0
>  
>



More information about the Lunar mailing list