From 75633f0c00af73c9324c1a58e57474312cfd479a Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 17 Oct 2010 14:31:58 +0200 Subject: Use "." package for package related to current working directory As in, > cd ~/packages/caretaker/man/1; ct p . will push the caretaker package. --- bin/ct | 6 ++++++ man/1/ct.pod | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/ct b/bin/ct index 84e4332..48c8a39 100755 --- a/bin/ct +++ b/bin/ct @@ -977,6 +977,12 @@ function pkg_version { ${$(git --git-dir=${self_path}/.git/ log -n 1)[2]} } +# cd ~/packages/caretaker; ct r . +# -> ct refresh caretaker + +if [[ ${1} == . ]] { + 1=${${PWD#${PKG_DIR}/}%%/*} +} cd ${PKG_DIR} || die "Cannot cd ${PKG_DIR}" diff --git a/man/1/ct.pod b/man/1/ct.pod index 8306368..5ae7743 100644 --- a/man/1/ct.pod +++ b/man/1/ct.pod @@ -95,6 +95,9 @@ Update local/remote package list (both if no argument is given) =back +For all actions which expect a I as argument, if the first argument +is C<< . >>, the package related to the current working directory will be used. + =head2 SHORT ACTIONS Instead of the Is described above, you may also use their short @@ -128,7 +131,7 @@ so please see caretaker.conf(5) for more information. =over -=item F<~/.caretaker.conf> +=item F<~/.config/caretaker/caretaker.conf> or F<~/.caretaker.conf> Contains configuration vars -- cgit v1.2.3