]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
replace symlinks with actual files
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 22 Jan 2025 09:31:53 +0000 (10:31 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 27 Jan 2025 08:13:34 +0000 (09:13 +0100)
pdns/recursordist/meson-dist-script

index 06f5572b1a0c685c127c195c358aa92f8ef55a9a..7d935a8713ce063236bd2a6bdd4b9194aba4639c 100755 (executable)
@@ -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