mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:57:35 +00: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
|
||||||
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"
|
local tempdir="$(pwd)/.patches.tmp"
|
||||||
rm -fr "$tempdir"
|
rm -fr "$tempdir"
|
||||||
mkdir "$tempdir"
|
mkdir "$tempdir"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue