Mercurial > hg > RemoteViewer
annotate dist.sh @ 19:a949d4849c6a
implement deleting a connection
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Thu, 25 Sep 2014 01:39:24 +0200 |
parents | 07d74b88ac8d |
children |
rev | line source |
---|---|
9
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
1 #!/bin/bash |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
2 |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
3 ZIP_FILE="RemoteViewer.zip" |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
4 |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
5 if [ -d $ZIP_FILE ]; then |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
6 rm $ZIP_FILE |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
7 fi |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
8 |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
9 # make sure all resources are generated before byte-compiling |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
10 make |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
11 |
14
07d74b88ac8d
do not invoke make on the PyQtLib, byte-compiling is done in a single step from dist.sh. Make sure that python3 is used everywhere
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
9
diff
changeset
|
12 python3 -m compileall . |
9
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
13 |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
14 for file in `find . -name \*\.pyc -print`; do |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
15 echo $file |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
16 if [[ $file =~ (.*)__pycache__/(.*)\.cpython-..(.*) ]]; then |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
17 target="${BASH_REMATCH[1]}${BASH_REMATCH[2]}${BASH_REMATCH[3]}" |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
18 cp $file $target |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
19 rm $file |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
20 else |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
21 echo 'no match' |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
22 exit 1 |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
23 fi |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
24 done |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
25 |
d666b9fe5663
dist.sh builds an executable zip file
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
26 find . -name \*.pyc -print | xargs zip -@ $ZIP_FILE |