mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-04 06:54:27 -05:00 
			
		
		
		
	fix ./scripts/env delete
SVN-Revision: 12399
This commit is contained in:
		
							parent
							
								
									949c1386d1
								
							
						
					
					
						commit
						1063f8d415
					
				@ -148,10 +148,11 @@ env_clear() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
env_delete() {
 | 
					env_delete() {
 | 
				
			||||||
	local name="${1##*/}"
 | 
						local name="${1##*/}"
 | 
				
			||||||
 | 
						env_init
 | 
				
			||||||
	[ -z "$name" ] && usage
 | 
						[ -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}')"
 | 
						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"
 | 
						git branch -D "$name"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user