summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-08-27 14:13:47 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-08-27 14:13:47 +0000
commiteeddc0fb462be32e9200610778d87a5d0b7a0b94 (patch)
tree7a4ada993b6cbc5754b7ccaef913fb9ca07ab56f /scripts
parent21994b96774711f3385d7c146e3fb49552f1d835 (diff)
fix ./scripts/env delete
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12399 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts')
-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"
}