]> git.sesse.net Git - vlc/blobdiff - extras/contrib/change_prefix.sh
playlist: Don't allow pl_Release(p_playlist) and pl_Yield(p_playlist).
[vlc] / extras / contrib / change_prefix.sh
index 3b8043223ac7892f0e54829c03d90913c226f618..9a307890c1d78346aa25e3e40927f1e031ef494f 100755 (executable)
@@ -19,7 +19,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 # ***************************************************************************
 
 usage="Usage: $0 <directory> <prefix> <new_prefix>"
@@ -34,7 +34,8 @@ fi
 
 top_dir=`cd $1; pwd`
 prefix=$2
-new_prefix=$3
+new_prefix2=$3
+new_prefix=/$new_prefix2
 
 if test -z $prefix -o -z $new_prefix; then
   echo $usage
@@ -42,11 +43,14 @@ if test -z $prefix -o -z $new_prefix; then
 fi
 
 cd $top_dir
+pwd
 files=`find . -type f`
 for file in $files; do
   if test ".`file $file | grep Mach-O`" != "." ; then
     libs=`otool -L $file 2>/dev/null | grep $prefix | cut -d\  -f 1`
+    echo $libs
     for i in "" $libs; do
+    echo $i
       if ! test -z $i; then
         install_name_tool -change $i \
                           `echo $i | sed -e "s,$prefix,$new_prefix,"` \
@@ -54,7 +58,18 @@ for file in $files; do
       fi
     done
   elif test ".`file $file | grep \"text\|shell\"`" != "." ; then
+
     sed -e "s,$prefix,$new_prefix,g" < $file > $file.tmp
     mv -f $file.tmp $file
   fi
 done
+
+cd $new_prefix2/lib/
+pwd
+files=` ls -1 *.la`
+for file in $files; do
+   echo $file
+   sed -e "s,$prefix,$new_prefix,g" < $file > $file.tmp
+   mv -f $file.tmp $file
+done
+