diff options
author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2007-11-06 21:59:56 +0100 |
---|---|---|
committer | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2007-11-06 21:59:56 +0100 |
commit | a6d7b4658b9e3e2f51b4a03ab6a19cbff9cf8c89 (patch) | |
tree | 62d3a27424d96c473353b1217c3dbfa2ba015095 | |
parent | 336dee46a51af1a7cd1d81a3eb6437b65516b2fb (diff) | |
download | ndim-git-utils-a6d7b4658b9e3e2f51b4a03ab6a19cbff9cf8c89.tar.gz ndim-git-utils-a6d7b4658b9e3e2f51b4a03ab6a19cbff9cf8c89.tar.xz ndim-git-utils-a6d7b4658b9e3e2f51b4a03ab6a19cbff9cf8c89.zip |
Add "git-amb purge-all" command
-rwxr-xr-x | git-amb/git-amb.in | 15 | ||||
-rw-r--r-- | git-amb/git-amb.man.in | 5 |
2 files changed, 20 insertions, 0 deletions
diff --git a/git-amb/git-amb.in b/git-amb/git-amb.in index a06b086..472324e 100755 --- a/git-amb/git-amb.in +++ b/git-amb/git-amb.in @@ -115,9 +115,11 @@ amb_init() { top_srcdir="$(cd_to_toplevel && pwd)" tmp="$(git-config amb.builddir)" || tmp="$GIT_DIR/amb/build" + amb_builddir="$(cond_cat_path "${top_srcdir}" "$tmp")" top_builddir="$(cond_cat_path "${top_srcdir}" "$tmp" "${git_branch}")" tmp="$(git-config amb.installdir)" || tmp="$GIT_DIR/amb/install" + amb_installdir="$(cond_cat_path "${top_srcdir}" "$tmp")" top_installdir="$(cond_cat_path "${top_srcdir}" "$tmp" "$git_branch")" amb_detect_configure @@ -169,6 +171,15 @@ amb_purge() { echo "$self: Finished." } +amb_purge_all() { + echo "$self: Purging ALL branches" + echo "$self: Purging $amb_builddir..." + rm -rf "$amb_builddir" + echo "$self: Purging $amb_installdir..." + rm -rf "$amb_installdir" + echo "$self: Finished." +} + amb_uninstall() { echo "$self: Uninstalling branch ${git_branch}" echo "$self: Purging $top_builddir..." @@ -237,6 +248,10 @@ if shift; then amb_init "$@" amb_purge ;; + purge-all) + amb_init "$@" + amb_purge_all + ;; uninstall) amb_init "$@" amb_uninstall diff --git a/git-amb/git-amb.man.in b/git-amb/git-amb.man.in index de06d0e..70426f3 100644 --- a/git-amb/git-amb.man.in +++ b/git-amb/git-amb.man.in @@ -62,6 +62,11 @@ The optional branch is the branch to print the builddir for. .B "git\-amb installdir [branch]" Print ${installdir}. The optional branch is the branch to print the installdir for. +.TP +.B "git\-amb purge\-all" +Remove build and install trees for +.I all +branches. .SH CONFIGURATION Use .B git\-config |