diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-10-25 15:32:57 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-11-11 15:32:31 +0100 |
commit | ecbff4483a84e2781a9d9776075de869556d0a76 (patch) | |
tree | 5588e1b37b5916220db31b2b1bf9cfd3ab9fcc6b | |
parent | 9dc3aa0120e4ce3f961051434085a7cb177983e3 (diff) |
dim: don't fall over relative namesfor-j4ni
If DIM_DRM_INTEL has .. in it (i.e. relative path) not everything
worked as expected, this fixes it. Allows you to use an existing git
checkout, while stashing all the dim stuff into some subdir somewhere
out of sight.
v2: Fixup paths. Oops.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
-rwxr-xr-x | dim | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -350,7 +350,7 @@ function update_rerere_cache cd $DIM_PREFIX/drm-rerere/ git pull cp rr-cache/* `rr_cache_dir` -r - cd - + cd - > /dev/null } function dim_revert_rerere @@ -1195,7 +1195,7 @@ function dim_update_branches update_rerere_cache } -function setup_aux_checkout # name remote +function setup_aux_checkout # name remote directory { local name=$1 local remote_url=$2 @@ -1211,7 +1211,7 @@ function setup_aux_checkout # name remote if [[ `git branch --list $name` == "" ]] ; then git branch --track $name $remote/$name fi - git worktree add ../$dir $name + git worktree add $DIM_PREFIX/$dir $name else git clone --reference=$DIM_PREFIX/$DIM_DRM_INTEL/.git $remote_url $dir cd $dir @@ -1227,7 +1227,7 @@ function setup_aux_checkout # name remote if [[ `git branch --list $name` == "" ]] ; then git checkout -t $remote/$name fi - cd .. + cd - > /dev/null } function dim_setup @@ -1251,6 +1251,7 @@ function dim_setup echoerr "or update your configuration (see dimrc.sample)." exit 1 fi + cd $DIM_DRM_INTEL # check remote configuration @@ -1259,7 +1260,7 @@ function dim_setup remote=`url_to_remote $drm_tip_ssh` remote=`url_to_remote $drm_upstream_git` - cd .. + cd $DIM_PREFIX setup_aux_checkout maintainer-tools $drm_intel_ssh maintainer-tools |