mirror of
https://github.com/geohot/qira
synced 2024-12-25 13:37:00 +03:00
19 lines
411 B
Bash
Executable File
19 lines
411 B
Bash
Executable File
#!/bin/bash -e
|
|
unamestr=$(uname)
|
|
if [[ "$unamestr" == 'Linux' ]]; then
|
|
DIR=$(dirname $(readlink -f $0))
|
|
elif [[ "$unamestr" == "Darwin" ]]; then
|
|
cmd=$(which "$0")
|
|
if [ -L "$cmd" ]; then
|
|
cmd=$(readlink "$cmd")
|
|
fi
|
|
DIR=$(dirname "$cmd")
|
|
else
|
|
echo "Only Linux and Mac OS X are supported!"
|
|
exit
|
|
fi
|
|
|
|
unset PYTHONPATH
|
|
source $DIR/venv/bin/activate
|
|
exec /usr/bin/env python $DIR/middleware/qira.py $*
|