]> git.madduck.net Git - code/myrepos.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

replace $(pwd) calls with $PWD
authormartin f. krafft <madduck@madduck.net>
Thu, 25 Oct 2007 21:37:24 +0000 (23:37 +0200)
committermartin f. krafft <madduck@madduck.net>
Thu, 25 Oct 2007 21:51:54 +0000 (23:51 +0200)
also ensure that $PWD is defined by adding it to lib

mr

diff --git a/mr b/mr
index 4c4d267cd59a87a0d91e928b80c90bc59b439dc8..c0f3e836d330668bc7844ec5162b6e1630dabb25 100755 (executable)
--- a/mr
+++ b/mr
@@ -931,6 +931,7 @@ ls = list
 [DEFAULT]
 order = 10
 lib =
 [DEFAULT]
 order = 10
 lib =
+       PWD="$pwd"
        error() {
                echo "mr: $@" >&2
                exit 1
        error() {
                echo "mr: $@" >&2
                exit 1
@@ -1076,7 +1077,7 @@ register =
        if [ -n "$1" ]; then
                cd "$1"
        fi
        if [ -n "$1" ]; then
                cd "$1"
        fi
-       basedir="$(basename $(pwd))"
+       basedir="$(basename $PWD)"
        case "$(get_repo_type .)" in
        svn)
                url=$(LANG=C svn info . | grep -i ^URL: | cut -d ' ' -f 2)
        case "$(get_repo_type .)" in
        svn)
                url=$(LANG=C svn info . | grep -i ^URL: | cut -d ' ' -f 2)
@@ -1084,7 +1085,7 @@ register =
                        error "cannot determine svn url"
                fi
                echo "Registering svn url: $url in $MR_CONFIG"
                        error "cannot determine svn url"
                fi
                echo "Registering svn url: $url in $MR_CONFIG"
-               mr -c "$MR_CONFIG" config "$(pwd)" checkout="svn co $url $basedir"
+               mr -c "$MR_CONFIG" config "$PWD" checkout="svn co $url $basedir"
                ;;
        git)
                local repo_type; repo_type="$(get_git_repo_type .)"
                ;;
        git)
                local repo_type; repo_type="$(get_git_repo_type .)"
@@ -1107,12 +1108,12 @@ register =
                                        error "git worktree $work_tree does not exist"
                                fi
                                suffix=" (with worktree $work_tree)"
                                        error "git worktree $work_tree does not exist"
                                fi
                                suffix=" (with worktree $work_tree)"
-                               mr -c "$MR_CONFIG" config "$(pwd)" \
+                               mr -c "$MR_CONFIG" config "$PWD" \
                                        lib="GIT_WORK_TREE=$work_tree; export GIT_WORK_TREE"
                                ;;
                esac
                echo "Registering git url: $url in $MR_CONFIG${suffix:-}"
                                        lib="GIT_WORK_TREE=$work_tree; export GIT_WORK_TREE"
                                ;;
                esac
                echo "Registering git url: $url in $MR_CONFIG${suffix:-}"
-               mr -c "$MR_CONFIG" config "$(pwd)" checkout="git clone $url $basedir"
+               mr -c "$MR_CONFIG" config "$PWD" checkout="git clone $url $basedir"
                ;;
        bzr)
                url=$(cat .bzr/branch/parent)
                ;;
        bzr)
                url=$(cat .bzr/branch/parent)
@@ -1120,7 +1121,7 @@ register =
                        error "cannot determine bzr url"
                fi
                echo "Registering bzr url: $url in $MR_CONFIG"
                        error "cannot determine bzr url"
                fi
                echo "Registering bzr url: $url in $MR_CONFIG"
-               mr -c "$MR_CONFIG" config "$(pwd)" checkout="bzr clone $url $basedir"
+               mr -c "$MR_CONFIG" config "$PWD" checkout="bzr clone $url $basedir"
                ;;
        CVS)
                repo=$(cat CVS/Repository)
                ;;
        CVS)
                repo=$(cat CVS/Repository)
@@ -1129,19 +1130,19 @@ register =
                        error "cannot determine cvs root"
                fi
                echo "Registering cvs repository $repo at root $root"
                        error "cannot determine cvs root"
                fi
                echo "Registering cvs repository $repo at root $root"
-               mr -c "$MR_CONFIG" config "$(pwd)" \
+               mr -c "$MR_CONFIG" config "$PWD" \
                        checkout="cvs -d '$root' co -d $basedir $repo"
                ;;
        hg)
                url=$(hg showconfig paths.default)
                echo "Registering mercurial repo url: $url in $MR_CONFIG"
                        checkout="cvs -d '$root' co -d $basedir $repo"
                ;;
        hg)
                url=$(hg showconfig paths.default)
                echo "Registering mercurial repo url: $url in $MR_CONFIG"
-               mr -c "$MR_CONFIG" config "$(pwd)" \
+               mr -c "$MR_CONFIG" config "$PWD" \
                        checkout="hg clone $url $basedir"
                ;;
        darcs)
                url=$(cat _darcs/prefs/defaultrepo)
                echo "Registering darcs repository $url in $MR_CONFIG"
                        checkout="hg clone $url $basedir"
                ;;
        darcs)
                url=$(cat _darcs/prefs/defaultrepo)
                echo "Registering darcs repository $url in $MR_CONFIG"
-               mr -c "$MR_CONFIG" config "$(pwd)" \
+               mr -c "$MR_CONFIG" config "$PWD" \
                        checkout="darcs get $url $basedir"
                ;;
        *) error "unable to register this repo type";;
                        checkout="darcs get $url $basedir"
                ;;
        *) error "unable to register this repo type";;