diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-07-19 21:39:04 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-07-19 21:39:04 +0100 |
commit | 7474eaa17f71f795b803993b0e1c38ff2afe6c1b (patch) | |
tree | 2ecd43758e5342c23d6e515ae2a616ce31a21cde /tests/lib | |
parent | c717d18c105d867245779baf67389d60e8f3d772 (diff) |
Test suite: Break out t-make-hook-link.
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -567,14 +567,20 @@ t-policy-nonexist () { ln -sf no-such-file-or-directory $drs_dispatch/policy-hook } -t-policy () { - local policyhook=$1 - policyhook=${DGIT_INFRA_PFX}$policyhook - case $policyhook in +t-make-hook-link () { + local hook=$1 # in infra/ + local linkpath=$2 + hook=${DGIT_INFRA_PFX}$hook + case $hook in */*) ;; - *) policyhook=`type -P $policyhook` ;; + *) hook=`type -P $hook` ;; esac - ln -sf "$policyhook" $drs_dispatch/policy-hook + ln -sf "$hook" $linkpath +} + +t-policy () { + local policyhook=$1 + t-make-hook-link $policyhook $drs_dispatch/policy-hook } t-debpolicy () { |