summaryrefslogtreecommitdiff
path: root/src/util/sync-config
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/sync-config')
-rw-r--r--src/util/sync-config17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/util/sync-config b/src/util/sync-config
new file mode 100644
index 0000000..6184167
--- /dev/null
+++ b/src/util/sync-config
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+set -eu
+
+if ! type gnunet-config >/dev/null; then
+ echo "$0 needs gnunet-config to be installed"
+ exit 1
+fi
+
+# FIXME: not very portable ...
+# FIXME: should use "libdir" instead of prefix/lib, but somehow
+# the recursive expansion does not work ;-(.
+GC=`which gnunet-config`
+ASAN=""
+A=`ldd $GC | grep libasan` && ASAN=`echo $A | awk '{print $3 ":"}'`
+export LD_PRELOAD=${ASAN}${LD_PRELOAD:-}:/home/grothoff/lib/libsyncutil.so
+exec gnunet-config "$@"