conformal / spectrwm

A small dynamic tiling window manager for X11.
ISC License
1.33k stars 97 forks source link

buildver.sh tail(1) usage #95

Closed levaidaniel closed 9 years ago

levaidaniel commented 9 years ago

At least with this version of tail(1):

$ tail --version
tail (GNU coreutils) 8.23

buildver.sh can't output the revision, because tail thinks the -c 9 option means that 9 is a file. The working usage is tail -c9, or tail --bytes=9

Before:

$ sh buildver.sh 
tail: cannot open ‘9’ for reading: No such file or directory
SPECTRWM_2_6_2-

After:

$ sh buildver.sh 
SPECTRWM_2_6_2-1e725018
LordReg commented 9 years ago

No issue here with the same version of tail:

$ tail --version
tail (GNU coreutils) 8.23
$ sh buildver.sh
SPECTRWM_2_6_2-1e725018

Maybe the shell? I'm using zsh.

levaidaniel commented 9 years ago

Actually, this a Slackware specific issue, because the coreutils package gets compiled with DEFAULT_POSIX2_VERSION=199209, and that causes this (I presume legacy) operation. Any chance you could change it to --bytes=9; that seems universal.

LordReg commented 9 years ago

That parameter isn't available on the POSIX.1-compliant OpenBSD tail(1). http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/tail.1?query=tail

levaidaniel commented 9 years ago

Oh, crap. Okay, I'll just work this around in the slackbuild.

Thanks!