summaryrefslogtreecommitdiff
path: root/Meta/install-ports-tree.sh
blob: 1003c83df4e9b04a13bc1e11cd7c00a384e01b04 (plain)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env bash

SERENITY_PORTS_DIR="${SERENITY_SOURCE_DIR}/Build/${SERENITY_ARCH}/Root/usr/Ports"

for file in $(git ls-files "${SERENITY_SOURCE_DIR}/Ports"); do
    if [ "$(basename "$file")" != ".hosted_defs.sh" ]; then
        target=${SERENITY_PORTS_DIR}/$(realpath --relative-to="${SERENITY_SOURCE_DIR}/Ports" "$file")
        mkdir -p "$(dirname "$target")" && cp "$file" "$target"
    fi
done