# $1 - feature repo url
# return true if exists
__utils_repo_exists = {
	_repo = $1

	_repos = (feature:repo-list | grep $_repo)
	_repo_length = ($_repos length)
	_r = ( NOT { "$_repo_length" equals '0'} )
#	echo " ${_repo_length} :: $_r"
	$_r
}

# $1 - feature repo url
# return true if succeeded
__utils_check_install_repo = {

	_repo = $1

	_exists = __utils_repo_exists $_repo

	if { NOT { $_exists } } {
		try { 
			r = (feature:repo-add $_repo) 
		} catch { }		

		_exists = __utils_repo_exists $_repo
	}

	$_exists
}

__TRUE__ = {
	new (($.context bundle) loadClass java.lang.Boolean) 'true'
}

__FALSE__ = {
	new (($.context bundle) loadClass java.lang.Boolean) 'false'
}
