Skip to content

Commit

Permalink
Really fix relocate.sh for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaerkl-sw committed Mar 4, 2019
1 parent cafa474 commit 2df813f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions relocate.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ CURRENT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$CURRENT_ROOT"

if [ "${PLATFORM}" == "macos" ]; then
REPLACE_FILES="pyside/lib/cmake/**/*.cmake pyside/lib/pkgconfig/*.pc qt/lib/pkgconfig/*.pc python/lib/pkgconfig/*.pc"
else
REPLACE_FILES="pyside/lib/cmake/**/*.cmake pyside/lib/pkgconfig/*.pc qt/lib/pkgconfig/*.pc python/Python.framework/Versions/Current/lib/pkgconfig/*.pc"
else
REPLACE_FILES="pyside/lib/cmake/**/*.cmake pyside/lib/pkgconfig/*.pc qt/lib/pkgconfig/*.pc python/lib/pkgconfig/*.pc"
fi

ORIGINAL_ROOT_ESCAPED="${ORIGINAL_ROOT////\\/}"
Expand All @@ -15,7 +15,7 @@ CURRENT_ROOT_ESCAPED="${CURRENT_ROOT////\\/}"
for file in $REPLACE_FILES; do
echo "Relocating $file"
if [ "${PLATFORM}" == "macos" ]; then
sed -i".original" "s/$ORIGINAL_ROOT_ESCAPED/$CURRENT_ROOT_ESCAPED/g" -e "$file"
sed -i".original" -e "s/$ORIGINAL_ROOT_ESCAPED/$CURRENT_ROOT_ESCAPED/g" "$file"
else
sed -i -e "s/$ORIGINAL_ROOT_ESCAPED/$CURRENT_ROOT_ESCAPED/g" "$file"
fi
Expand Down

0 comments on commit 2df813f

Please sign in to comment.