mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
Ports: Handle generating a ReadMe for an empty patch directory
This commit is contained in:
parent
f6005764d7
commit
c1dc8c9ccb
Notes:
sideshowbarker
2024-07-17 08:13:43 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/c1dc8c9ccb Pull-request: https://github.com/SerenityOS/serenity/pull/15268 Reviewed-by: https://github.com/alimpfard ✅ Reviewed-by: https://github.com/gmta
|
@ -624,6 +624,14 @@ do_generate_patch_readme() {
|
|||
fi
|
||||
fi
|
||||
|
||||
# An existing patches directory but no actual patches presumably means that we just deleted all patches,
|
||||
# so remove the ReadMe file accordingly.
|
||||
if [ -z "$(find -L "${PORT_META_DIR}/patches" -maxdepth 1 -name '*.patch' -print -quit)" ]; then
|
||||
>&2 echo "Port $port does not have any patches, deleting ReadMe..."
|
||||
rm -f "${PORT_META_DIR}/patches/ReadMe.md"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
local tempdir="$(pwd)/.patches.tmp"
|
||||
rm -fr "$tempdir"
|
||||
mkdir "$tempdir"
|
||||
|
|
Loading…
Reference in a new issue