SConstruct (11925:cc1e01a99561) | SConstruct (11926:3e3d489a3a69) |
---|---|
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 --- 379 unchanged lines hidden (view full) --- 388 return hook.exists() 389 390 def hook_install(hook_name, script): 391 hook = git_hooks.File(hook_name) 392 if hook.exists(): 393 print "Warning: Can't install %s, hook already exists." % hook_name 394 return 395 | 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 --- 379 unchanged lines hidden (view full) --- 388 return hook.exists() 389 390 def hook_install(hook_name, script): 391 hook = git_hooks.File(hook_name) 392 if hook.exists(): 393 print "Warning: Can't install %s, hook already exists." % hook_name 394 return 395 |
396 if hook.islink(): 397 print "Warning: Removing broken symlink for hook %s." % hook_name 398 os.unlink(hook.get_abspath()) 399 |
|
396 if not git_hooks.exists(): 397 mkdir(git_hooks.get_abspath()) 398 399 # Use a relative symlink if the hooks live in the source directory 400 if hook.is_under(main.root): 401 script_path = os.path.relpath( 402 script.get_abspath(), 403 hook.Dir(".").get_abspath()) --- 1189 unchanged lines hidden --- | 400 if not git_hooks.exists(): 401 mkdir(git_hooks.get_abspath()) 402 403 # Use a relative symlink if the hooks live in the source directory 404 if hook.is_under(main.root): 405 script_path = os.path.relpath( 406 script.get_abspath(), 407 hook.Dir(".").get_abspath()) --- 1189 unchanged lines hidden --- |