diff options
| -rwxr-xr-x | build | 17 | ||||
| -rwxr-xr-x | include/git.sh | 22 | ||||
| -rwxr-xr-x | include/option.sh | 12 | ||||
| -rwxr-xr-x | script/update/release | 1 | 
4 files changed, 23 insertions, 29 deletions
| @@ -64,17 +64,14 @@ initialise_command()  	check_project  	case "${1}" in -	help) -		usage ${0} -		lbmk_exit 0 ;; -	list) -		items "${buildpath}" -		lbmk_exit 0 ;; -	version) -		mkversion -		lbmk_exit 0 ;; +	help) usage ${0} ;; +	list) items "${buildpath}" ;; +	version) mkversion ;; +	*) +		option="${1}" +		return 0 ;;  	esac -	option="${1}" +	lbmk_exit 0  }  install_packages() diff --git a/include/git.sh b/include/git.sh index 9a73bd92..e361cb41 100755 --- a/include/git.sh +++ b/include/git.sh @@ -36,8 +36,8 @@ fetch_config()  		eval "$(setvars "" rev tree)"  		_xm="fetch_config ${project}/${_target}"  		load_target_config "${_target}" -		[ "${_target}" != "${tree}" ] && _target="${tree}" && continue -		break +		[ "${_target}" = "${tree}" ] && break +		_target="${tree}"  	done  } @@ -65,14 +65,9 @@ prepare_new_tree()  	cp -R "src/${project}/${project}" "${tmp_git_dir}" || \  	    err "prepare_new_tree ${project}/${tree}: can't make tmpclone"  	git_reset_rev "${tmp_git_dir}" "${rev}" -	( -	cd "${tmp_git_dir}" || \ -	    err "prepare_new_tree ${project}/${tree}: can't cd tmpclone" -	if [ -f ".gitmodules" ]; then -		git submodule update --init --checkout || \ -		    err "prepare_new_tree ${project}/${tree}: !submodules" -	fi -	) || err "git submodule update failure" +	[ ! -f "${tmp_git_dir}/.gitmodules" ] || \ +		git -C "${tmp_git_dir}" submodule update --init --checkout \ +		    || err "prepare_new_tree ${project}/${tree}: !submodules"  	git_am_patches "${tmp_git_dir}" "$PWD/$cfgsdir/$tree/patches" || \  	    err "prepare_new_tree ${project}/${tree}: patch fail"  	[ "${patchfail}" = "y" ] && err "PATCH FAIL" @@ -151,10 +146,9 @@ git_am_patches()  		[ -L "${patch}" ] && continue  		[ -f "${patch}" ] || continue  		git am "${patch}" || patchfail="y" -		if [ "${patchfail}" = "y" ]; then -			git am --abort || err  "${sdir}: !git am --abort" -			err  "!git am ${patch} -> ${sdir}" -		fi +		[ "${patchfail}" != "y" ] && continue +		git am --abort || err  "${sdir}: !git am --abort" +		err  "!git am ${patch} -> ${sdir}"  	done  	) || err "PATCH FAILURE"  	for patches in "${patchdir}/"*; do diff --git a/include/option.sh b/include/option.sh index ed094b5c..a764bc33 100755 --- a/include/option.sh +++ b/include/option.sh @@ -20,9 +20,10 @@ eval "$(setvars "" CONFIG_BOARD_DELL_E6400 CONFIG_HAVE_MRC CONFIG_HAVE_ME_BIN \  items()  {  	rval=1 -	[ ! -d "${1}" ] && \ -		printf "items: directory '%s' doesn't exist" "${1}" && \ -		    return 1 +	if [ ! -d "${1}" ]; then +		printf "items: directory '%s' doesn't exist" "${1}" 1>&2 +		return 1 +	fi  	for x in "${1}/"*; do  		# -e used because this is for files *or* directories  		[ -e "${x}" ] || continue @@ -43,7 +44,10 @@ scan_config()  	    "${_fail}" "scan_config ${confdir}: Cannot concatenate files"  	while read -r line ; do  		set ${line} 1>/dev/null 2>/dev/null || : -		[ "${1%:}" = "depend" ] && depend="${depend} ${2}" && continue +		if [ "${1%:}" = "depend" ]; then +			depend="${depend} ${2}" +			continue +		fi  		eval "${1%:}=\"${2}\""  	done << EOF  	$(eval "awk '${awkstr}' \"${revfile}\"") diff --git a/script/update/release b/script/update/release index 3abdae3e..b762b89d 100755 --- a/script/update/release +++ b/script/update/release @@ -103,7 +103,6 @@ build_release()  		esac  		./vendor inject "${vrom}" || \  		    err "TESTFAIL: inject: ${vrom##*/}" -		continue  	done  	) || err "vendorfile inject test failure" | 
