Add argument --is-dynamic-pkgver

This commit is contained in:
leafee98 2023-08-18 20:04:03 +08:00
parent fe278387e5
commit 985c0e7a06

15
makedeb
View file

@ -13,6 +13,7 @@ _ARGLIST=("$@")
OVERRIDE_SOURCE=0
QUIET=0
PACKAGELIST=0
IS_DYNAMICV_PKGVER=0
_STEP_CLEAN=1
_STEP_RETRIEVE_SOURCE=1
@ -444,6 +445,7 @@ function show_help {
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 " --is-dynamic-pkgver exit with 0 if DEBBUILD will update pkgver later"
echo " -h|--help show this message"
}
@ -476,9 +478,8 @@ while (( "$#" >= 1 )); do
_STOP_AFTER_BUILD=1
;;
--packagelist)
PACKAGELIST=1
;;
--packagelist) PACKAGELIST=1 ;;
--is-dynamic-pkgver) IS_DYNAMICV_PKGVER=1 ;;
-h|--help) show_help ; exit 0;;
*) err "Unkown option $1"
@ -496,6 +497,14 @@ if (( PACKAGELIST )) ; then
exit 0
fi
if (( IS_DYNAMICV_PKGVER )) ; then
if is_function pkgver ; then
exit 0
else
exit 4
fi
fi
if (( QUIET )) ; then
disable_stdout
fi