Changeset 12502


Ignore:
Timestamp:
2008-09-02T17:48:40+02:00 (8 years ago)
Author:
nbd
Message:

fix ./scripts/env for newer git versions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/env

    r12399 r12502  
    151151        env_init 
    152152        [ -z "$name" ] && usage 
    153         [ -f "$ENVDIR/.git/refs/heads/$name" ] || error "environment '$name' not found" 
    154153        branch="$(git branch | grep '^\* ' | awk '{print $2}')" 
    155154        [ "$name" = "$branch" ] && error "cannot delete the currently selected environment" 
     
    160159        local name="${1##*/}" 
    161160        [ -z "$name" ] && usage 
    162         [ -f "$ENVDIR/.git/refs/heads/$name" ] || error "environment '$name' not found" 
    163161 
    164162        env_init 
    165163        env_ask_sync 
    166         git checkout "$name" 
     164        git checkout "$name" || error "environment '$name' not found" 
    167165        env_link_config 
    168166} 
Note: See TracChangeset for help on using the changeset viewer.