diff options
author | Peter Elliott <pelliott@ualberta.ca> | 2021-04-02 21:53:41 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-12 14:06:24 +0200 |
commit | 938924f36de1f335903608c28c4ba5284d5dd883 (patch) | |
tree | 9c6fa78bc702ccc2b01b85d87719ead859d7b7d2 /Meta/install-ports-tree.sh | |
parent | 9c3948ef3e496839a7ae5f6bd4cfb93b7eada682 (diff) | |
download | serenity-938924f36de1f335903608c28c4ba5284d5dd883.zip |
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
Diffstat (limited to 'Meta/install-ports-tree.sh')
-rwxr-xr-x | Meta/install-ports-tree.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Meta/install-ports-tree.sh b/Meta/install-ports-tree.sh new file mode 100755 index 0000000000..ceac2058fa --- /dev/null +++ b/Meta/install-ports-tree.sh @@ -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 |