File: update-macros

package info (click to toggle)
gstreamer1.0 1.28.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,604 kB
  • sloc: ansic: 203,072; python: 1,985; sh: 566; lex: 188; lisp: 154; java: 81; makefile: 59; cpp: 58; perl: 46
file content (26 lines) | stat: -rwxr-xr-x 549 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

set -e

if test -z "$1" -o -n "$2"; then
    echo "Usage: $0 FILE" >&2
    exit 1
fi

file=$1

if grep -q GST_GET_LOCK $file; then
    echo "$file: GST_GET_LOCK->GST_OBJECT_GET_LOCK"
    perl -i -p -e 's/GST_GET_LOCK/GST_OBJECT_GET_LOCK/g' $file
fi

if egrep -q 'GST_LOCK' $file; then
    echo "$file: GST_LOCK->GST_OBJECT_LOCK"
    perl -i -p -e 's/GST_LOCK/GST_OBJECT_LOCK/g' $file
fi

if egrep -q 'GST_UNLOCK' $file; then
    echo "$file: GST_UNLOCK->GST_OBJECT_UNLOCK"
    perl -i -p -e 's/GST_UNLOCK/GST_OBJECT_UNLOCK/g' $file
fi