Skip to content

Instantly share code, notes, and snippets.

@gboddin
Created August 8, 2016 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gboddin/64a37357500159b8fd7231c79bc9949a to your computer and use it in GitHub Desktop.
Save gboddin/64a37357500159b8fd7231c79bc9949a to your computer and use it in GitHub Desktop.
#!/bin/bash
root=$(pwd)
linker=/lib/x86_64-linux-gnu/ld-2.19.so
my_ld_library_path="${root}/lib64:${root}/usr/lib64"
while read lib_path; do
my_ld_library_path="${root}${lib_path}:${my_ld_library_path}"
done < <(cat "${root}/etc/ld.so.conf.d"/* 2> /dev/null | grep -v '^#')
my_path=${root}/bin:${root}/sbin:${root}/usr/bin:${root}/usr/sbin
LD_LIBRARY_PATH="${my_ld_library_path}" PATH=${my_path} "${root}${linker}" $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment