Sequel Pro是Mac下非常棒的Mysql图形化工具,相比Navicat,免费,开源,轻量。

#!/bin/bash

SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)

echo '=======================Clone source code======================='
git clone https://github.com/sequelpro/sequelpro.git --depth=1
cd $SHELL_FOLDER/sequelpro
echo 'ok!'

echo '=======================Change build config to Release======================='
sed -i '' -e 's/Debug/Release/g' Makefile
echo 'ok!'

echo '=======================Remove i386 (32 bits) from ARCHS environment variable======================='
find . -type f -name "*.pbxproj" -exec sed -i '' -e 's/ARCHS_STANDARD_32_64_BIT/ARCHS_STANDARD_64_BIT/g' {} +
echo 'ok!'

echo '=======================Build======================='
make

echo '=======================Success======================='
echo 'Check the build info above, the .app file is usually at ~/Library/Developer/Xcode/DerivedData/sequel-pro-[some random string]/Build/Products/Release/Sequel Pro.app'