From: Lzu Tao Date: Wed, 28 Nov 2018 14:59:35 +0000 (+0700) Subject: No need these helpers X-Git-Tag: v1.3.8~36^2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3175188407ea8d02587f4c3bc0137af22876d42d;p=thirdparty%2Fzstd.git No need these helpers --- diff --git a/contrib/meson/CopyFile.py b/contrib/meson/CopyFile.py deleted file mode 100644 index 6c0288ee4..000000000 --- a/contrib/meson/CopyFile.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python3 -# ############################################################################# -# Copyright (c) 2018-present lzutao -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ############################################################################# -import os -import sys -import shutil - - -def usage(): - print('usage: python3 CreateSymlink.py ') - print('Copy the file named src to a file named dst') - sys.exit(1) - - -def main(): - if len(sys.argv) < 3: - usage() - src = sys.argv[1] - dst = sys.argv[2] - - if os.path.exists(dst): - print ('File already exists: %r' % (dst)) - return - - shutil.copy2(src, dst) - - -if __name__ == '__main__': - main() diff --git a/contrib/meson/CreateSymlink.py b/contrib/meson/CreateSymlink.py deleted file mode 100644 index d0f9918ab..000000000 --- a/contrib/meson/CreateSymlink.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python3 -# ############################################################################# -# Copyright (c) 2018-present lzutao -# All rights reserved. -# -# This source code is licensed under both the BSD-style license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# ############################################################################# -import os -import sys - - -def usage(): - print('usage: python3 CreateSymlink.py [dst is dir: True or False]') - sys.exit(1) - - -def main(): - if len(sys.argv) < 3: - usage() - src = sys.argv[1] - dst = sys.argv[2] - is_dir = False - if len(sys.argv) == 4: - is_dir = bool(sys.argv[3]) - - if os.path.islink(dst) and os.readlink(dst) == src: - print ('File exists: %r -> %r' % (dst, src)) - return - - os.symlink(src, dst, is_dir) - - -if __name__ == '__main__': - main()