Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37046337
en ru br
ALT Linux repos
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

Other repositories
Upstream:1.96-beta

Group :: Sound
RPM: festival

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and 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)
 )
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin