#!/bin/sh
# The Bitmask Launcher
# (c) 2015 - The LEAP Encryption Access Project

[ -f libQtCore.so.4 ] || ln -s libQtCore.so.4.orig libQtCore.so.4
[ -f libQtGui.so.4 ] || ln -s libQtGui.so.4.orig libQtGui.so.4
[ -f libQtNetwork.so.4 ] || ln -s libQtNetwork.so.4.orig libQtNetwork.so.4
[ -f libQtSvg.so.4 ] || ln -s libQtSvg.so.4.orig libQtSvg.so.4
[ -f libQtWebKit.so.4 ] || ln -s libQtWebKit.so.4.orig libQtWebKit.so.4
[ -f libQtXmlPatterns.so.4 ] || ln -s libQtXmlPatterns.so.4.orig libQtXmlPatterns.so.4
[ -f libQtXml.so.4 ] || ln -s libQtXml.so.4.orig libQtXml.so.4

cat /etc/os-release | grep ID | grep -i ubuntu && \
	unlink libQtCore.so.4 && \
	unlink libQtGui.so.4 && \
	unlink libQtNetwork.so.4 && \
	unlink libQtSvg.so.4 && \
	unlink libQtWebKit.so.4 && \
	unlink libQtXmlPatterns.so.4 && \
	unlink libQtXml.so.4

./bitmask-app --standalone "$@"