summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuta SATOH <nigoro@gentoo.gr.jp>2012-10-14 15:07:46 +0900
committerYuta SATOH <nigoro@gentoo.gr.jp>2012-10-14 15:07:46 +0900
commitff57cdc66510010107d7d91e4cdad9480b6f31d0 (patch)
treed84bc0fc0c7afc74edfcaa2a67d561e20fb5be3f /scripts/migrate_libdir.sh
parentupdate catalyst-2.0.11-fbsd.patch, added GNU sed wrapper, fix bug 438112 (diff)
downloadgentoo-bsd-ff57cdc66510010107d7d91e4cdad9480b6f31d0.tar.gz
gentoo-bsd-ff57cdc66510010107d7d91e4cdad9480b6f31d0.tar.bz2
gentoo-bsd-ff57cdc66510010107d7d91e4cdad9480b6f31d0.zip
added migrate_libdir.sh -- Script for users who have been using old profile on amd64-fbsd , bug 436560
Diffstat (limited to 'scripts/migrate_libdir.sh')
-rwxr-xr-xscripts/migrate_libdir.sh21
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
+