aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-08-27 14:13:47 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-08-27 14:13:47 +0000
commita36f6fae22f0e08982642cd2a2f6331393cb6ab0 (patch)
tree7a4ada993b6cbc5754b7ccaef913fb9ca07ab56f
parent3813d5c593a1431cf5d02601993bb942c42f0ab0 (diff)
downloadmaster-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
-rwxr-xr-xscripts/env5
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"
}