diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2009-09-21 14:51:26 -0300 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2009-09-21 14:52:09 -0300 |
commit | 9af36fbb64f19842c0cc797c0b586b3a686805e8 (patch) | |
tree | 6bbc050ded0f85517ea75f5dc6dc1ed172168248 /tests/util/rename_imports.sh | |
parent | aa12538d63685ef8f75adaa79411b751929b727d (diff) |
Added all original pyside unit tests to the shiboken version.
Diffstat (limited to 'tests/util/rename_imports.sh')
-rwxr-xr-x | tests/util/rename_imports.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/util/rename_imports.sh b/tests/util/rename_imports.sh new file mode 100755 index 000000000..fd3ba1c62 --- /dev/null +++ b/tests/util/rename_imports.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Rename import statements from .py script to use a specific module name +set -e + +if [ $# -lt 3 ]; then + echo "Usage: $0 <old_name> <new_name> <directories...>" + exit 1 +fi + +old_name=$1; shift +new_name=$1; shift + +find "$@" -name "*.py" -exec sed -ri "s/(import|from) $old_name/\1 $new_name/" '{}' \; |