diff options
author | Felix Fietkau <nbd@openwrt.org> | 2008-09-02 15:48:40 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2008-09-02 15:48:40 +0000 |
commit | 973d7e80d7855ad24dbc0e7864ff24f37b8a70e6 (patch) | |
tree | 66f5eef3de9cc492e1c77c85970f04cf54a7f41e /scripts/env | |
parent | 081d16fed0c84409069c31c874a509289d139558 (diff) | |
download | mtk-20170518-973d7e80d7855ad24dbc0e7864ff24f37b8a70e6.zip mtk-20170518-973d7e80d7855ad24dbc0e7864ff24f37b8a70e6.tar.gz mtk-20170518-973d7e80d7855ad24dbc0e7864ff24f37b8a70e6.tar.bz2 |
fix ./scripts/env for newer git versions
SVN-Revision: 12502
Diffstat (limited to 'scripts/env')
-rwxr-xr-x | scripts/env | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/env b/scripts/env index 1aee4b3..e088695 100755 --- a/scripts/env +++ b/scripts/env @@ -150,7 +150,6 @@ env_delete() { local name="${1##*/}" env_init [ -z "$name" ] && usage - [ -f "$ENVDIR/.git/refs/heads/$name" ] || error "environment '$name' not found" branch="$(git branch | grep '^\* ' | awk '{print $2}')" [ "$name" = "$branch" ] && error "cannot delete the currently selected environment" git branch -D "$name" @@ -159,11 +158,10 @@ env_delete() { env_switch() { local name="${1##*/}" [ -z "$name" ] && usage - [ -f "$ENVDIR/.git/refs/heads/$name" ] || error "environment '$name' not found" env_init env_ask_sync - git checkout "$name" + git checkout "$name" || error "environment '$name' not found" env_link_config } |