mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
Ports: Actually clean port build directory
The functionality for `./package.sh clean` was a bit weird: based on whether you were working in dev mode, it would try to delete either `$workdir` or `$nongit_workdir` and `*.out` from your `pwd`. The new functionality is pretty clear: `./package.sh clean` deletes the entire build directory for the port regardless of what mode you're in, `./package.sh clean_dist` removes all `$files`, and `./package.sh clean_all` does both.
This commit is contained in:
parent
27fa038ffa
commit
5bfc61bc69
Notes:
sideshowbarker
2024-07-17 07:48:42 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/5bfc61bc69 Pull-request: https://github.com/SerenityOS/serenity/pull/15221 Reviewed-by: https://github.com/timschumi
1 changed files with 6 additions and 20 deletions
|
@ -441,11 +441,7 @@ func_defined post_install || post_install() {
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
func_defined clean || clean() {
|
func_defined clean || clean() {
|
||||||
if [ -z "${IN_SERENITY_PORT_DEV:-}" ]; then
|
rm -rf "${PORT_BUILD_DIR}"
|
||||||
rm -rf "$workdir" *.out
|
|
||||||
else
|
|
||||||
rm -rf "$nongit_workdir" *.out
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
func_defined clean_dist || clean_dist() {
|
func_defined clean_dist || clean_dist() {
|
||||||
OLDIFS=$IFS
|
OLDIFS=$IFS
|
||||||
|
@ -457,18 +453,8 @@ func_defined clean_dist || clean_dist() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
func_defined clean_all || clean_all() {
|
func_defined clean_all || clean_all() {
|
||||||
if [ -z "${IN_SERENITY_PORT_DEV:-}" ]; then
|
clean
|
||||||
rm -rf "$workdir" *.out
|
clean_dist
|
||||||
else
|
|
||||||
rm -rf "$nongit_workdir" *.out
|
|
||||||
fi
|
|
||||||
OLDIFS=$IFS
|
|
||||||
IFS=$'\n'
|
|
||||||
for f in $files; do
|
|
||||||
IFS=$OLDIFS
|
|
||||||
read url filename hash <<< $(echo "$f")
|
|
||||||
rm -f "${PORT_META_DIR}/${filename}"
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
addtodb() {
|
addtodb() {
|
||||||
if [ -n "$(package_install_state $port $version)" ]; then
|
if [ -n "$(package_install_state $port $version)" ]; then
|
||||||
|
@ -574,15 +560,15 @@ do_install() {
|
||||||
addtodb "${1:-}"
|
addtodb "${1:-}"
|
||||||
}
|
}
|
||||||
do_clean() {
|
do_clean() {
|
||||||
echo "Cleaning workdir and .out files in $port..."
|
echo "Cleaning build directory for $port..."
|
||||||
clean
|
clean
|
||||||
}
|
}
|
||||||
do_clean_dist() {
|
do_clean_dist() {
|
||||||
echo "Cleaning dist in $port..."
|
echo "Cleaning dist files for $port..."
|
||||||
clean_dist
|
clean_dist
|
||||||
}
|
}
|
||||||
do_clean_all() {
|
do_clean_all() {
|
||||||
echo "Cleaning all in $port..."
|
echo "Cleaning all for $port..."
|
||||||
clean_all
|
clean_all
|
||||||
}
|
}
|
||||||
do_uninstall() {
|
do_uninstall() {
|
||||||
|
|
Loading…
Reference in a new issue