aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/env
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
commit1063f8d415b283779cc459b6c0fbfb91810c83f2 (patch)
tree3b3e524fc15d0961e43c7fd18ea0ccfeae67e086 /scripts/env
parent949c1386d1b257505ee8715defc896bfeddccb5e (diff)
downloadupstream-1063f8d415b283779cc459b6c0fbfb91810c83f2.tar.gz
upstream-1063f8d415b283779cc459b6c0fbfb91810c83f2.tar.bz2
upstream-1063f8d415b283779cc459b6c0fbfb91810c83f2.zip
fix ./scripts/env delete
SVN-Revision: 12399
Diffstat (limited to 'scripts/env')
-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"
}