1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:47:34 +00:00

Ports: De-special case ./package.sh dev

There is nothing special about the `dev` command; move its logic to
`do_dev` and invoke it generalized.
This commit is contained in:
Jelle Raaijmakers 2023-05-09 01:17:52 +02:00 committed by Andreas Kling
parent a81e83f3b5
commit 3af92a76be

View file

@ -772,6 +772,15 @@ do_dev() {
exit 1
fi
if [ "${1:-}" != "--no-depends" ]; then
do_installdepends
fi
if [ -d "$workdir" ] && [ ! -d "$workdir/.git" ]; then
if prompt_yes_no "- Would you like to clean the working direcory (i.e. ./package.sh clean)?"; then
do_clean
fi
fi
local force_patch_regeneration='false'
[ -d "$workdir" ] || {
@ -893,7 +902,7 @@ parse_arguments() {
return
fi
case "$1" in
build|clean|clean_all|clean_dist|configure|fetch|generate_patch_readme|install|installdepends|patch|shell|showproperty|uninstall)
build|clean|clean_all|clean_dist|configure|dev|fetch|generate_patch_readme|install|installdepends|patch|shell|showproperty|uninstall)
method=$1
shift
do_${method} "$@"
@ -910,18 +919,6 @@ parse_arguments() {
export PS1="(serenity):\w$ "
bash --norc
;;
dev)
shift
if [ "${1:-}" != "--no-depends" ]; then
do_installdepends
fi
if [ -d "$workdir" ] && [ ! -d "$workdir/.git" ]; then
if prompt_yes_no "- Would you like to clean the working direcory (i.e. ./package.sh clean)?"; then
do_clean
fi
fi
do_dev
;;
*)
>&2 echo "I don't understand $1! Supported arguments: build, clean, clean_all, clean_dist, configure, dev, fetch, generate_patch_readme, install, installdepends, interactive, patch, shell, showproperty, uninstall."
exit 1