diff options
-rwxr-xr-x | bin/checklinks | 5 | ||||
-rwxr-xr-x | bin/ct | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/bin/checklinks b/bin/checklinks index 3150293..d9df1a2 100755 --- a/bin/checklinks +++ b/bin/checklinks @@ -268,9 +268,12 @@ Set the level threshold to show status messages. =item B<-p>, B<--parameter> I<parameter>=I<value> While reading the links file, replace $I<parameter> with I<value>. + When used in conjuction with ct(1), $package will be set to the current package's relative path (as seen from $HOME, like C<packages/caretaker>), -and $etc will be set to $package/etc (like C<packages/caretaker/etc>) +$etc will be set to $package/etc (like C<packages/caretaker/etc>) and $pkgdir +will point to the package root (like C<packages>). Also, for each of these +parameters, C<a_param> (like $a_etc) is the corresponding absolute path. =item B<-q>, B<--quiet> @@ -416,9 +416,15 @@ function priority_name { function run_checklinks { if [[ -e links ]] { + ${self_path}/bin/checklinks ${*} ${CL_OPTIONS} \ - --parameter package=${PWD} \ - --parameter etc=${PWD}/etc + --parameter package=${PWD} \ + --parameter a_package=${HOME}/${PWD} \ + --parameter etc=${PWD}/etc \ + --parameter a_etc=${HOME}/${PWD}/etc \ + --parameter pkgdir=${PKG_DIR#${HOME}/} \ + --parameter a_pkgdir=${PKG_DIR} + } elif [[ -d etc && ${MAGIC_ETC} == 1 ]] { ${self_path}/bin/checklinks --ct-auto ${CL_OPTIONS} ${*} } |