mirror of
https://github.com/facebook/zstd.git
synced 2025-08-08 17:22:10 +03:00
meson: Update usage of InstallSymlink helper
This commit is contained in:
@@ -29,19 +29,19 @@ def install_symlink(src, dst, install_dir, dst_is_dir=False, dir_mode=0o777):
|
|||||||
|
|
||||||
new_dst = os.path.join(install_dir, dst)
|
new_dst = os.path.join(install_dir, dst)
|
||||||
if os.path.islink(new_dst) and os.readlink(new_dst) == src:
|
if os.path.islink(new_dst) and os.readlink(new_dst) == src:
|
||||||
print('File exists: %r -> %r' % (dst, src))
|
print('File exists: {!r} -> {!r}'.format(new_dst, src))
|
||||||
return
|
return
|
||||||
print('Installing symlink %r -> %r' % (new_dst, src))
|
print('Installing symlink {!r} -> {!r}'.format(new_dst, src))
|
||||||
os.symlink(src, new_dst, dst_is_dir)
|
os.symlink(src, new_dst, dst_is_dir)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
import argparse
|
import argparse
|
||||||
parser = argparse.ArgumentParser(description='Install a symlink.\n',
|
parser = argparse.ArgumentParser(description='Install a symlink',
|
||||||
usage='InstallSymlink.py [-h] [-d] [-m MODE] src dst install_dir\n\n'
|
usage='InstallSymlink.py [-h] [-d] [-m MODE] src dst install_dir\n\n'
|
||||||
'example:\n'
|
'example:\n'
|
||||||
'\tInstallSymlink.py libcrypto.so.1.0.0 libcrypt.so '
|
'\tInstallSymlink.py dash sh /bin\n'
|
||||||
'/usr/lib/x86_64-linux-gnu False')
|
'\tDESTDIR=./staging InstallSymlink.py dash sh /bin')
|
||||||
parser.add_argument('src', help='target to link')
|
parser.add_argument('src', help='target to link')
|
||||||
parser.add_argument('dst', help='link name')
|
parser.add_argument('dst', help='link name')
|
||||||
parser.add_argument('install_dir', help='installation directory')
|
parser.add_argument('install_dir', help='installation directory')
|
||||||
|
Reference in New Issue
Block a user