breaking: exit normally when package already built
This is helpful when using local_build.sh scripts.
This commit is contained in:
parent
985c0e7a06
commit
932f8b695e
11
makedeb
11
makedeb
|
@ -72,6 +72,11 @@ function msg2 {
|
|||
local mesg=$1; shift
|
||||
printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@"
|
||||
}
|
||||
function warn {
|
||||
(( QUIET )) && return 0
|
||||
local mesg=$1; shift
|
||||
printf "${YELLOW}==>${ALL_OFF}${BOLD}${YELLOW} ${mesg}${ALL_OFF}\n" "$@" >&2
|
||||
}
|
||||
function err {
|
||||
(( QUIET )) && return 0
|
||||
local mesg=$1; shift
|
||||
|
@ -532,8 +537,10 @@ if (( ! _IN_FAKEROOT )) ; then
|
|||
# Check if the package already exists
|
||||
if (( _STEP_CHCECK_PACKAGE_EXISTS )) ; then
|
||||
if [[ -f "$(get_deb_name)" ]] ; then
|
||||
err "The package already exists. (use -f to force build)"
|
||||
exit 13
|
||||
warn "%s %s" \
|
||||
"The package $(get_deb_name) already exists, skipping build." \
|
||||
"(use -f to force re-build)"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue