Add help msg, use _STEP_CHCECK_PACKAGE_EXISTS to replace FORCE
This commit is contained in:
parent
3065562dab
commit
9aedecc62e
21
makedeb
21
makedeb
|
@ -13,12 +13,12 @@ _ARGLIST=("$@")
|
||||||
OVERRIDE_SOURCE=0
|
OVERRIDE_SOURCE=0
|
||||||
QUIET=0
|
QUIET=0
|
||||||
PACKAGELIST=0
|
PACKAGELIST=0
|
||||||
FORCE=0
|
|
||||||
|
|
||||||
_STEP_CLEAN=1
|
_STEP_CLEAN=1
|
||||||
_STEP_RETRIEVE_SOURCE=1
|
_STEP_RETRIEVE_SOURCE=1
|
||||||
_STEP_EXTRACT_SOURCE=1
|
_STEP_EXTRACT_SOURCE=1
|
||||||
_STEP_UPDATE_PKGVER=1
|
_STEP_UPDATE_PKGVER=1
|
||||||
|
_STEP_CHCECK_PACKAGE_EXISTS=1
|
||||||
_STEP_BUILD=1
|
_STEP_BUILD=1
|
||||||
_STEP_PACKAGE=1
|
_STEP_PACKAGE=1
|
||||||
_STEP_CREATE_ARCHIVE=1
|
_STEP_CREATE_ARCHIVE=1
|
||||||
|
@ -27,6 +27,7 @@ _STOP_AFTER_CLEAN=0
|
||||||
_STOP_AFTER_RETRIEVE_SOURCE=0
|
_STOP_AFTER_RETRIEVE_SOURCE=0
|
||||||
_STOP_AFTER_EXTRACT_SOURCE=0
|
_STOP_AFTER_EXTRACT_SOURCE=0
|
||||||
_STOP_AFTER_UPDATE_PKGVER=0
|
_STOP_AFTER_UPDATE_PKGVER=0
|
||||||
|
#_STEP_CHCECK_PACKAGE_EXISTS=0 # stop after checking exists is useless
|
||||||
_STOP_AFTER_BUILD=0
|
_STOP_AFTER_BUILD=0
|
||||||
_STOP_AFTER_PACKAGE=0
|
_STOP_AFTER_PACKAGE=0
|
||||||
_STOP_AFTER_CREATE_ARCHIVE=0
|
_STOP_AFTER_CREATE_ARCHIVE=0
|
||||||
|
@ -435,9 +436,14 @@ function enable_stdout {
|
||||||
|
|
||||||
function show_help {
|
function show_help {
|
||||||
echo "$0 [OPTIONS]"
|
echo "$0 [OPTIONS]"
|
||||||
echo " -OS override source"
|
echo " -Q quiet, disable log"
|
||||||
echo " -STF show the filename to be generated"
|
echo " -f|--force don't check if package already exists, will"
|
||||||
echo " -Q quiet, disable log"
|
echo " override the existed package"
|
||||||
|
echo " --noextract use the current srcdir to build package, skip"
|
||||||
|
echo " those retrieve source steps"
|
||||||
|
echo " --noarchive retrieve and build, but don't package to .deb"
|
||||||
|
echo " --packagelist show file to be generated by current DEBBUILD"
|
||||||
|
echo " -h|--help show this message"
|
||||||
}
|
}
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -447,9 +453,8 @@ function show_help {
|
||||||
while (( "$#" >= 1 )); do
|
while (( "$#" >= 1 )); do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-F) _IN_FAKEROOT=1 ;;
|
-F) _IN_FAKEROOT=1 ;;
|
||||||
-OS|--override-source) OVERRIDE_SOURCE=1 ;;
|
|
||||||
-Q) QUIET=1 ;;
|
-Q) QUIET=1 ;;
|
||||||
-f|--force) FORCE=1 ;;
|
-f|--force) _STEP_CHCECK_PACKAGE_EXISTS=0 ;;
|
||||||
--noextract)
|
--noextract)
|
||||||
_STEP_CLEAN=0
|
_STEP_CLEAN=0
|
||||||
_STEP_RETRIEVE_SOURCE=0
|
_STEP_RETRIEVE_SOURCE=0
|
||||||
|
@ -457,6 +462,7 @@ while (( "$#" >= 1 )); do
|
||||||
_STEP_UPDATE_PKGVER=0
|
_STEP_UPDATE_PKGVER=0
|
||||||
;;
|
;;
|
||||||
--nobuild)
|
--nobuild)
|
||||||
|
_STEP_CHCECK_PACKAGE_EXISTS=0
|
||||||
_STEP_BUILD=0
|
_STEP_BUILD=0
|
||||||
_STEP_PACKAGE=0
|
_STEP_PACKAGE=0
|
||||||
_STEP_CREATE_ARCHIVE=0
|
_STEP_CREATE_ARCHIVE=0
|
||||||
|
@ -464,6 +470,7 @@ while (( "$#" >= 1 )); do
|
||||||
_STOP_AFTER_UPDATE_PKGVER=1
|
_STOP_AFTER_UPDATE_PKGVER=1
|
||||||
;;
|
;;
|
||||||
--noarchive)
|
--noarchive)
|
||||||
|
_STEP_CHCECK_PACKAGE_EXISTS=0
|
||||||
_STEP_CREATE_ARCHIVE=0
|
_STEP_CREATE_ARCHIVE=0
|
||||||
|
|
||||||
_STOP_AFTER_BUILD=1
|
_STOP_AFTER_BUILD=1
|
||||||
|
@ -513,7 +520,7 @@ if (( ! _IN_FAKEROOT )) ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if the package already exists
|
# Check if the package already exists
|
||||||
if (( ! FORCE )) ; then
|
if (( _STEP_CHCECK_PACKAGE_EXISTS )) ; then
|
||||||
if [[ -f "$(get_deb_name)" ]] ; then
|
if [[ -f "$(get_deb_name)" ]] ; then
|
||||||
err "The package already exists. (use -f to force build)"
|
err "The package already exists. (use -f to force build)"
|
||||||
exit 13
|
exit 13
|
||||||
|
|
Loading…
Reference in a new issue