I'm makeing an SRPM for xfstt and I need a good way to test for the existance of at least one .ttf file before it runs xfstt -sync, I thought of checking for the directory then checking for a *.ttf but it reports an error of too many files to process (130+ ttf's). Anybody have any thoughts on this? <snip> if test -f /usr/share/fonts/truetype/*.ttf ; then xfstt --sync fi <end snip> -- S.Toms - tomas@primenet.com - www.primenet.com/~tomas SuSE Linux v6.3+ - Kernel 2.2.14 "All my life I wanted to be someone; I guess I should have been more specific." -- Jane Wagner -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Hi, On Sat, Feb 05, 2000 at 16:09 -0800, S.Toms wrote:
I'm makeing an SRPM for xfstt and I need a good way to test for the existance of at least one .ttf file before it runs xfstt -sync, I thought of checking for the directory then checking for a *.ttf but it reports an error of too many files to process (130+ ttf's). Anybody have any thoughts on this?
<snip> if test -f /usr/share/fonts/truetype/*.ttf ; then xfstt --sync fi <end snip>
for x in /usr/share/fonts/truetype/*.[tT][tT][fF]; do if test -f "$x"; then xfstt --sync break fi done It's kind of ugly but it works. Ciao, Stefan -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On Sun, 6 Feb 2000, Stefan Troeger wrote: st> Hi, st> st> On Sat, Feb 05, 2000 at 16:09 -0800, S.Toms wrote: st> st> > I'm makeing an SRPM for xfstt and I need a good way to test for the st> > existance of at least one .ttf file before it runs xfstt -sync, I thought st> > of checking for the directory then checking for a *.ttf but it reports an st> > error of too many files to process (130+ ttf's). Anybody have any thoughts st> > on this? st> > st> > <snip> st> > if test -f /usr/share/fonts/truetype/*.ttf ; then st> > xfstt --sync st> > fi st> > <end snip> st> st> for x in /usr/share/fonts/truetype/*.[tT][tT][fF]; do st> if test -f "$x"; then st> xfstt --sync st> break st> fi st> done st> st> It's kind of ugly but it works. st> Your right, ugly as hell, but does work :) xfstt ################################################## Postinstall xfstt-1... xfstt: sync in directory "/usr/share/fonts/truetype/." Found 136 fonts. Totally installed: 1 thanks again :) st> Ciao, st> Stefan st> st> -- S.Toms - tomas@primenet.com - www.primenet.com/~tomas SuSE Linux v6.3+ - Kernel 2.2.14 Join the march to save individuality! -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On Sat, 05 Feb 2000, S.Toms wrote:
I'm makeing an SRPM for xfstt and I need a good way to test for the existance of at least one .ttf file before it runs xfstt -sync, I thought of checking for the directory then checking for a *.ttf but it reports an error of too many files to process (130+ ttf's). Anybody have any thoughts on this?
<snip> if test -f /usr/share/fonts/truetype/*.ttf ; then xfstt --sync fi <end snip>
-- S.Toms - tomas@primenet.com - www.primenet.com/~tomas
You may know this already, and it doesn't really help with your problem, but I've heard this question before. . .In case anyone out there doesn't know this you can use the "file" command to get the type of most files. It could be scripted to test files, but in the case of truetype fonts it returns a generic label "raw G3 data, byte-padded" that's why I say it doesn't help you much. Just thought it may help other newbies. I've been using Unix type systems for several years now and I still think I am a newbie. Every new command helps. :-) -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Darren R. Weber drw@linuxfan.com ICQ# 2849193 http://drw.penguinpowered.com/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (3)
-
stefan.troeger@wirtschaft.tu-chemnitz.de
-
tomas@primenet.com
-
weberdr@bellsouth.net