diff options
author | Felix Fietkau <nbd@openwrt.org> | 2008-08-27 14:13:47 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2008-08-27 14:13:47 +0000 |
commit | a36f6fae22f0e08982642cd2a2f6331393cb6ab0 (patch) | |
tree | 7a4ada993b6cbc5754b7ccaef913fb9ca07ab56f /scripts/env | |
parent | 3813d5c593a1431cf5d02601993bb942c42f0ab0 (diff) | |
download | master-187ad058-a36f6fae22f0e08982642cd2a2f6331393cb6ab0.tar.gz master-187ad058-a36f6fae22f0e08982642cd2a2f6331393cb6ab0.tar.bz2 master-187ad058-a36f6fae22f0e08982642cd2a2f6331393cb6ab0.zip |
fix ./scripts/env delete
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12399 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts/env')
-rwxr-xr-x | scripts/env | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/env b/scripts/env index a1211fbde0..1aee4b323b 100755 --- a/scripts/env +++ b/scripts/env @@ -148,10 +148,11 @@ env_clear() { env_delete() { local name="${1##*/}" + env_init [ -z "$name" ] && usage - [ -f "$envdir/.git/refs/heads/$name" ] || error "environment '$name' not found" + [ -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" + [ "$name" = "$branch" ] && error "cannot delete the currently selected environment" git branch -D "$name" } |