From: Otto Moerbeek Date: Wed, 22 Jan 2025 09:31:53 +0000 (+0100) Subject: replace symlinks with actual files X-Git-Tag: dnsdist-2.0.0-alpha1~127^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec409ef98360d50adad55c994c72c49c72b09ded;p=thirdparty%2Fpdns.git replace symlinks with actual files --- diff --git a/pdns/recursordist/meson-dist-script b/pdns/recursordist/meson-dist-script index 06f5572b1a..7d935a8713 100755 --- a/pdns/recursordist/meson-dist-script +++ b/pdns/recursordist/meson-dist-script @@ -1,5 +1,16 @@ -#!/bin/sh +#!/bin/sh -e + +echo Runnig meson-dist-script +echo PWD=$(pwd) +echo MESON_SOURCE_ROOT=$MESON_SOURCE_ROOT +echo MESON_PROJECT_DIST_ROOT=$MESON_PROJECT_DIST_ROOT + +cd "$MESON_PROJECT_DIST_ROOT" + +# Get all symlinks +symlinks=$(find . -type l) + +# Get the dereffed symbolic links (the actual files being pointed to) from the source dir +# Extract them over the existing symbolic links +tar -C "$MESON_SOURCE_ROOT" -hcf - $symlinks | tar -xf - -C "$MESON_PROJECT_DIST_ROOT" -echo HI AM AM THE DIST SCRIPT -pwd -env