[MPlayer-dev-eng] [PATCH] version.sh date -r for BSD/OS

Felix Buenemann atmosfear at users.sourceforge.net
Tue Jun 11 06:01:24 CEST 2002


On Tuesday 11 June 2002 05:43, Steven M. Schultz wrote:
> Hi!
>
> 	I finally decided to track down why a date.core kept getting
> 	created  and see that Darwin uses the same  type of 'date -r'
> 	command as I do.
>
> 	Was not sure if it was better to expand the existing if statement
> 	or simply add a 'elif' so I chose the second method.

Hmm, I think I'll rewrite version.sh completely, so it will first check os and 
then have a switch statement, to chooses correct command by os. Another 
chance would be to completely integrate the script into configure, with the 
disadvantage, that version string only changes, if configure is run.
Or another idea would be to generate a small c prog that gets the date.
>
> 	Cheers,
> 	Steven Schultz
> 	sms at 2bsd.com
>
> ====================cut here====================
> --- version.sh.dist	Sun May  5 16:27:20 2002
> +++ version.sh	Mon Jun 10 20:39:23 2002
> @@ -7,6 +7,9 @@
>  elif test `uname -s` = 'Darwin' ; then
>          # darwin's date has different meaning for -r
>          last_cvs_update=`date +%y%m%d-%H:%M`
> +elif test `uname -s` = 'BSD/OS' ; then
> +        # non-GNU (BSD) systems also have a different meaning for -r
> +        last_cvs_update=`date +%y%m%d-%H:%M`
>  fi
>
>  echo "#define VERSION \"CVS-${last_cvs_update}-$1 \"" >version.h

-- 
Best Regards,
        Atmos
____________________________________________
- MPlayer Developer - http://mplayerhq.hu/ -
____________________________________________



More information about the MPlayer-dev-eng mailing list