SConstruct (11927:8f764ba85a6c) SConstruct (11928:9b1161fa252c)
1# -*- mode:python -*-
2
3# Copyright (c) 2013, 2015, 2016 ARM Limited
4# All rights reserved.
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

--- 393 unchanged lines hidden (view full) ---

402
403 abs_symlink_hooks = git_hooks.islink() and \
404 os.path.isabs(os.readlink(git_hooks.get_abspath()))
405
406 # Use a relative symlink if the hooks live in the source directory,
407 # and the hooks directory is not a symlink to an absolute path.
408 if hook.is_under(main.root) and not abs_symlink_hooks:
409 script_path = os.path.relpath(
1# -*- mode:python -*-
2
3# Copyright (c) 2013, 2015, 2016 ARM Limited
4# All rights reserved.
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

--- 393 unchanged lines hidden (view full) ---

402
403 abs_symlink_hooks = git_hooks.islink() and \
404 os.path.isabs(os.readlink(git_hooks.get_abspath()))
405
406 # Use a relative symlink if the hooks live in the source directory,
407 # and the hooks directory is not a symlink to an absolute path.
408 if hook.is_under(main.root) and not abs_symlink_hooks:
409 script_path = os.path.relpath(
410 script.get_abspath(),
411 hook.Dir(".").get_abspath())
410 os.path.realpath(script.get_abspath()),
411 os.path.realpath(hook.Dir(".").get_abspath()))
412 else:
413 script_path = script.get_abspath()
414
415 try:
416 os.symlink(script_path, hook.get_abspath())
417 except:
418 print "Error updating git %s hook" % hook_name
419 raise

--- 1181 unchanged lines hidden ---
412 else:
413 script_path = script.get_abspath()
414
415 try:
416 os.symlink(script_path, hook.get_abspath())
417 except:
418 print "Error updating git %s hook" % hook_name
419 raise

--- 1181 unchanged lines hidden ---