1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

General clean up

This commit is contained in:
RowenStipe 2016-01-26 10:48:21 -05:00 committed by Zetok Zalbavar
parent 5a02091441
commit 3a452a700f
No known key found for this signature in database
GPG Key ID: C953D3880212068A

View File

@ -32,7 +32,11 @@ VER="${QT_DIR}/5.5.1_2" # Potential future proffing for version testing
QMAKE="${VER}/bin/qmake" # Don't change QMAKE="${VER}/bin/qmake" # Don't change
MACDEPLOYQT="${VER}/bin/macdeployqt" # Don't change MACDEPLOYQT="${VER}/bin/macdeployqt" # Don't change
if [ $TRAVIS = true ]]; then #travis check
QTOX_DIR="${MAIN_DIR}"
else
QTOX_DIR="${MAIN_DIR}/qTox" # Change to Git location QTOX_DIR="${MAIN_DIR}/qTox" # Change to Git location
fi
TOXCORE_DIR="${MAIN_DIR}/toxcore" # Change to Git location TOXCORE_DIR="${MAIN_DIR}/toxcore" # Change to Git location
@ -55,7 +59,7 @@ function build-toxcore() {
echo "Now working in: ${PWD}" echo "Now working in: ${PWD}"
#Check if libsodium is correct version #Check if libsodium is correct version
if [ -e /usr/local/opt/libsodium/lib/libsodium.18.dylib ]; then if [[ -e /usr/local/opt/libsodium/lib/libsodium.18.dylib ]]; then
fcho " Beginnning Toxcore compile " fcho " Beginnning Toxcore compile "
else else
echo "Error: libsodium.18.dylib not found! Unable to build!" echo "Error: libsodium.18.dylib not found! Unable to build!"
@ -86,7 +90,7 @@ function install() {
read -n1 -rsp $'Press any key to continue or Ctrl+C to exit...\n' read -n1 -rsp $'Press any key to continue or Ctrl+C to exit...\n'
fi fi
if [ -e /usr/local/bin/brew ]; then if [[ -e /usr/local/bin/brew ]]; then
fcho "Homebrew already installed!" fcho "Homebrew already installed!"
else else
fcho "Installing homebrew ..." fcho "Installing homebrew ..."
@ -104,7 +108,7 @@ function install() {
fcho "Starting git repo checks ..." fcho "Starting git repo checks ..."
cd $MAIN_DIR # just in case cd $MAIN_DIR # just in case
if [ -e $TOX_DIR/.git/index ]; then # Check if this exists if [[ -e $TOX_DIR/.git/index ]]; then # Check if this exists
fcho "Toxcore git repo already inplace !" fcho "Toxcore git repo already inplace !"
cd $TOX_DIR cd $TOX_DIR
git pull git pull
@ -112,7 +116,7 @@ function install() {
fcho "Cloning Toxcore git ... " fcho "Cloning Toxcore git ... "
git clone https://github.com/irungentoo/toxcore.git git clone https://github.com/irungentoo/toxcore.git
fi fi
if [ -e $QTOX_DIR/.git/index ]; then # Check if this exists if [[ -e $QTOX_DIR/.git/index ]]; then # Check if this exists
fcho "qTox git repo already inplace !" fcho "qTox git repo already inplace !"
cd $QTOX_DIR cd $QTOX_DIR
git pull git pull
@ -121,7 +125,7 @@ function install() {
git clone https://github.com/tux3/qTox.git git clone https://github.com/tux3/qTox.git
fi fi
# filter_audio # filter_audio
if [ -e $FA_DIR/.git/index ]; then # Check if this exists if [[ -e $FA_DIR/.git/index ]]; then # Check if this exists
fcho "Filter_Audio git repo already inplace !" fcho "Filter_Audio git repo already inplace !"
cd $FA_DIR cd $FA_DIR
git pull git pull
@ -142,7 +146,8 @@ function install() {
fcho "If all went well you should now have all the tools needed to compile qTox!" fcho "If all went well you should now have all the tools needed to compile qTox!"
read -r -p "Would you like to install toxcore now? [y/N] " response read -r -p "Would you like to install toxcore now? [y/N] " response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then
build-toxcore build_toxcore
else else
fcho "You can simply use the -u command and say [Yes/n] when prompted" fcho "You can simply use the -u command and say [Yes/n] when prompted"
fi fi
@ -209,34 +214,34 @@ function deploy() {
} }
# The commands # The commands
if [ "$1" == "-i" ]; then if [[ "$1" == "-i" ]]; then
install install
exit 0 exit
fi fi
if [ "$1" == "-u" ]; then if [[ "$1" == "-u" ]]; then
update update
exit 0 exit
fi fi
if [ "$1" == "-b" ]; then if [[ "$1" == "-b" ]]; then
build build
exit 0 exit
fi fi
if [ "$1" == "-d" ]; then if [[ "$1" == "-d" ]]; then
deploy deploy
exit 0 exit
fi fi
if [ "$1" == "-ubd" ]; then if [[ "$1" == "-ubd" ]]; then
update update
build build
deploy deploy
exit 0 exit
fi fi
if [ "$1" == "-h" ]; then if [[ "$1" == "-h" ]]; then
echo "This script was created to help ease the process of compiling and creating a distribuable qTox package for OSX systems." echo "This script was created to help ease the process of compiling and creating a distribuable qTox package for OSX systems."
echo "The avilable commands are:" echo "The avilable commands are:"
echo "-h -- This help text." echo "-h -- This help text."