view 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
line wrap: on
line source

#!/bin/bash

ZIP_FILE="RemoteViewer.zip"

if [ -d $ZIP_FILE ]; then
	rm $ZIP_FILE
fi

# make sure all resources are generated before byte-compiling
make

python3 -m compileall .

for file in `find . -name \*\.pyc -print`; do
	echo $file
	if [[ $file =~ (.*)__pycache__/(.*)\.cpython-..(.*) ]]; then
		target="${BASH_REMATCH[1]}${BASH_REMATCH[2]}${BASH_REMATCH[3]}"
		cp $file $target
		rm $file
	else
		echo 'no match'
		exit 1
	fi
done

find . -name \*.pyc -print | xargs zip -@ $ZIP_FILE