mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 21:39:47 +00:00
23 lines
470 B
Python
Executable File
23 lines
470 B
Python
Executable File
#!/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])
|