mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
Ports: Handle generating a ReadMe for an empty patch directory
This commit is contained in:
parent
f6005764d7
commit
c1dc8c9ccb
1 changed files with 8 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue