Mercurial > hg > easyhg
annotate deploy/osx/testrun.sh @ 733:7942b7633505
Further to adding Plink component
author | Chris Cannam |
---|---|
date | Mon, 17 Dec 2018 18:48:31 +0000 |
parents | 5afb26b7575a |
children |
rev | line source |
---|---|
Chris@722 | 1 #!/bin/bash |
Chris@722 | 2 |
Chris@722 | 3 app="$1" |
Chris@722 | 4 if [ -z "$app" ]; then |
Chris@722 | 5 echo "Usage: $0 <appname>" |
Chris@722 | 6 echo "Provide appname without the .app extension, please" |
Chris@722 | 7 exit 2 |
Chris@722 | 8 fi |
Chris@722 | 9 |
Chris@722 | 10 set -eu |
Chris@722 | 11 |
Chris@722 | 12 qtdir=$(grep "Command:" Makefile | head -1 | awk '{ print $3; }' | sed s,/bin/.*,,) |
Chris@722 | 13 |
Chris@722 | 14 if [ ! -d "$qtdir" ]; then |
Chris@722 | 15 echo "Failed to discover Qt installation directory from Makefile, exiting" |
Chris@722 | 16 exit 2 |
Chris@722 | 17 fi |
Chris@722 | 18 |
Chris@722 | 19 pyqtdir=/Library/Python/2.7/site-packages/PyQt5 |
Chris@722 | 20 |
Chris@722 | 21 if [ ! -d "$pyqtdir" ]; then |
Chris@722 | 22 echo "PyQt directory $pyqtdir not found - is it installed?" |
Chris@722 | 23 fi |
Chris@722 | 24 |
Chris@722 | 25 enumegg=/Library/Python/2.7/site-packages/enum34-1.1.6-py2.7.egg |
Chris@722 | 26 |
Chris@722 | 27 if [ ! -f "$enumegg" ]; then |
Chris@722 | 28 echo "Enum module egg $enumegg not found - check and maybe update the reference in this script" |
Chris@722 | 29 fi |
Chris@722 | 30 |
Chris@722 | 31 set -x |
Chris@722 | 32 |
Chris@722 | 33 suffix=$$ |
Chris@722 | 34 |
Chris@722 | 35 move_aside() { |
Chris@722 | 36 sudo mv "$qtdir" "$qtdir"_$suffix |
Chris@722 | 37 sudo mv "$pyqtdir" "$pyqtdir"_$suffix |
Chris@722 | 38 sudo mv "$enumegg" "$enumegg"_$suffix |
Chris@722 | 39 } |
Chris@722 | 40 |
Chris@722 | 41 restore() { |
Chris@722 | 42 sudo mv "$qtdir"_$suffix "$qtdir" |
Chris@722 | 43 sudo mv "$pyqtdir"_$suffix "$pyqtdir" |
Chris@722 | 44 sudo mv "$enumegg"_$suffix "$enumegg" |
Chris@722 | 45 } |
Chris@722 | 46 |
Chris@722 | 47 move_aside |
Chris@722 | 48 trap restore 0 |
Chris@722 | 49 |
Chris@722 | 50 "$app.app"/Contents/MacOS/$app |
Chris@722 | 51 |