diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/migrate_libdir.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/migrate_libdir.sh b/scripts/migrate_libdir.sh new file mode 100755 index 0000000..eded8c1 --- /dev/null +++ b/scripts/migrate_libdir.sh @@ -0,0 +1,21 @@ +#!/bin/bash +for d in / /usr /usr/local +do + if [ -L ${d}/lib ] ; then + ls -l ${d}/lib | grep lib64 > /dev/null 2>&1 + if [ $? -eq 0 ] ; then + rm ${d}/lib + if [ -d ${d}/lib64 ] ; then + LD_LIBRARY_PATH="${d}/lib64" mv ${d}/lib64 ${d}/lib + else + mkdir ${d}/lib + fi + ln -s lib ${d}/lib64 + echo "Migrated to ${d}/lib from ${d}/lib64" + else + echo "Migration fails, lib symlink target is not ${d}/lib64." + ls -l ${d}/lib + fi + fi +done + |