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

Meta: Add install-ports CMake target

install-ports copys the necessary files from Ports/ to /usr/Ports. Also
refactor the compiler and destiation variables from .port_include.sh
into .hosted_defs.sh. .hosted_defs.sh does not exists when ports are
built in serenity
This commit is contained in:
Peter Elliott 2021-04-02 21:53:41 -06:00 committed by Andreas Kling
parent 9c3948ef3e
commit 938924f36d
5 changed files with 40 additions and 12 deletions

10
Meta/install-ports-tree.sh Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
SERENITY_PORTS_DIR="${SERENITY_ROOT}/Build/${SERENITY_ARCH}/Root/usr/Ports"
for file in $(git ls-files "${SERENITY_ROOT}/Ports"); do
if [ "$(basename "$file")" != ".hosted_defs.sh" ]; then
target=${SERENITY_PORTS_DIR}/$(realpath --relative-to="${SERENITY_ROOT}/Ports" "$file")
mkdir -p "$(dirname "$target")" && cp "$file" "$target"
fi
done

View file

@ -14,7 +14,8 @@ IGNORE_FILES = {
PORT_TABLE_FILE,
'build_all.sh',
'build_installed.sh',
'README.md'
'README.md',
'.hosted_defs.sh'
}