summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2010-10-17 14:31:58 +0200
committerDaniel Friesel <derf@finalrewind.org>2010-10-17 14:31:58 +0200
commit75633f0c00af73c9324c1a58e57474312cfd479a (patch)
treec0a7577e50a8c312a521f332519a31b8f8d374c1
parent580f4e7e90a045ec7c92b06c14613acb0d6f9e0a (diff)
Use "." package for package related to current working directory
As in, > cd ~/packages/caretaker/man/1; ct p . will push the caretaker package.
-rwxr-xr-xbin/ct6
-rw-r--r--man/1/ct.pod5
2 files changed, 10 insertions, 1 deletions
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<package> 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 I<action>s 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