mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-05 06:45:39 +00:00
Makefile: shadow the phsource and dictsource directories instead of copying them
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
PREFIX=/usr
|
||||
REFIX=/usr
|
||||
BINDIR=$(PREFIX)/bin
|
||||
DATADIR=$(PREFIX)/share/espeak-data
|
||||
|
||||
@@ -45,8 +45,8 @@ espeak-phoneme-data:
|
||||
|
||||
espeak-data-dir:
|
||||
rm -rf espeak-data/dictsource espeak-data/phsource espeak-data/phondata-manifest
|
||||
cp -a phsource espeak-data/phsource
|
||||
cp -a dictsource espeak-data/dictsource
|
||||
./shadowdir $(PWD)/phsource $(PWD)/espeak-data/phsource
|
||||
./shadowdir $(PWD)/dictsource $(PWD)/espeak-data/dictsource
|
||||
|
||||
espeak-data: src/espeakedit espeak-data-dir
|
||||
rm -rf $(HOME)/espeak-data
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# Copyright (C) 2011 Reece H. Dunn
|
||||
# Licence: GPLv3
|
||||
#
|
||||
# A script for shadowing a directory tree to another (equivalent to lndir).
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
def shadow(src, dst):
|
||||
if not os.path.exists(dst):
|
||||
os.makedirs(dst)
|
||||
for fn in os.listdir(src):
|
||||
srcpath = os.path.join(src, fn)
|
||||
dstpath = os.path.join(dst, fn)
|
||||
if os.path.isdir(srcpath):
|
||||
shadow(srcpath, dstpath)
|
||||
else:
|
||||
os.symlink(srcpath, dstpath)
|
||||
|
||||
shadow(sys.argv[1], sys.argv[2])
|
||||
Reference in New Issue
Block a user