Created
May 21, 2009 19:10
-
-
Save posulliv/115654 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -ne 1 ] | |
then | |
echo "incorrect number of arguments" | |
echo "Usage" | |
echo "./script DRIZZLE_BUILD_ROOT_DIR" | |
exit 1 | |
fi | |
bin_dir=$1 | |
if [ ! -d ${bin_dir} ] | |
then | |
echo "Specified Drizzle build directory does not exist!" | |
exit 1 | |
fi | |
proc=`ps -ef | \ | |
grep drizzle | \ | |
grep -v -e 'grep drizzle' \ | |
-e 'bash' | \ | |
tee /dev/tty | \ | |
awk '{print $2}'` | |
if [ `echo "$proc" | wc -w` -ne 0 ] | |
then | |
echo "Drizzle is already running..." | |
exec gdb ${bin_dir}/drizzled/drizzled -silent "$proc" | |
else | |
echo "Drizzle is not already running..." | |
exec gdb ${bin_dir}/drizzled/drizzled | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment