Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37850354
en ru br
ALT Linux repositórios
S:2.5-alt0.4
5.0: 1.96-alt6
4.1: 1.96-alt5.M41.1
4.0: 1.96-alt2.6
3.0:
+backports:1.96-alt0.M30.1

Outros repositórios
Upstream:1.96-beta

Group :: Som
RPM: festival

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: festival-1.96-alt-unsafe-tmp-usage.patch
Download


diff --git a/festival/examples/saytime.sh b/festival/examples/saytime.sh
index 3efc2cf..c8eac1b 100644
--- a/festival/examples/saytime.sh
+++ b/festival/examples/saytime.sh
@@ -48,10 +48,13 @@
 
 (define (get-the-time)
 "Returns a list of hour and minute and second, for later processing"
- (let (date)
-   (system "date | awk '{print $4}' | tr : ' ' >/tmp/saytime.tmp")
-   (set! date (load "/tmp/saytime.tmp" t)) ;; loads the file unevaluated
-   (system "rm /tmp/saytime.tmp")
+ (let (date tmpdir tmpfile)
+   (set! tmpdir (getenv "TMPDIR"))
+   (if (null? tmpdir) (set! tmpdir "/tmp"))
+   (set! tmpfile (string-append tmpdir "/saytime.tmp"))
+   (system (string-append "date | awk '{print $4}' | tr : ' ' >" tmpfile))
+   (set! date (load tmpfile t)) ;; loads the file unevaluated
+   (system (string-append "rm " tmpfile))
    date)
 )
 
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009