mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 00:56:14 +02:00
fix ./scripts/env delete
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12399 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
21994b9677
commit
eeddc0fb46
@ -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"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user