]> git.sesse.net Git - vlc/blobdiff - contrib/src/change_prefix.sh
A bit more modern version of the About dialog
[vlc] / contrib / src / change_prefix.sh
index 10b8ed343e03eb2e8797513da462a27c1000f4cc..43636204dfb7846e930a5e1fe19fbdd0fe79684d 100755 (executable)
@@ -27,7 +27,7 @@ LANG=C
 export LANG
 
 if test "$1" = "-h" -o "$1" = "--help" -o $# -gt 2; then
-  echo "Usage: $0 [new_prefix] [old prefix]
+  echo "Usage: $0 [old prefix] [new prefix]
 
 Without arguments, this script assumes old prefix = @@CONTRIB_PREFIX@@,
 and new prefix = current directory.
@@ -43,16 +43,20 @@ else
     new_prefix=$2
 fi
 
-# process [dir] [filemask]
+# process [dir] [filemask] [text only]
 process() {
     for file in `find $1 -maxdepth 1 -type f -name "$2"`
     do
+        if [ -n "$3" ]
+        then
+            file $file | sed "s/^.*: //" | grep -q 'text\|shell' || continue
+        fi
         echo "Fixing up $file"
         sed -i.orig -e "s,$old_prefix,$new_prefix,g" $file
         rm -f $file.orig
     done
 }
 
-process bin/ "*"
+process bin/ "*" check
 process lib/ "*.la"
 process lib/pkgconfig/ "*.pc"