#!/bin/bash


# cmd may be: pyinstaller_path/Build.py
# we need to start the command from the pyinstaller directory

CMD=$(which $1)
SPEC_FILE="$(pwd)/$2"
VER=$3

PYINSTALLER_DIR=$(dirname $CMD)
cd $PYINSTALLER_DIR
$CMD $SPEC_FILE

cd -
cd pyinstaller
rm -f sqledit-*
ln -s sqledit sqledit-$VER
cp README sqledit
