Created
August 8, 2016 14:00
-
-
Save gboddin/64a37357500159b8fd7231c79bc9949a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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