grim/guifications3
Clone
Summary
Browse
Changes
Graph
cleaned up all the GTypeInfo initializers
2011-05-17, Gary Kramlich
13ff35d0d7f7
file is
Executable
cleaned up all the GTypeInfo initializers
closes #683
#!/bin/sh
# Guifications - The end-all, be-all notification framework
# Copyright (C) 2003-2009 Gary Kramlich <grim@reaperworld.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
DIR
=
`
pwd
`
MTN_DIR
=
""
# look for the _MTN directory
while
[
x
"
${
DIR
}
"
!
=
x
"/"
]
do
if
[
-d
${
DIR
}
/_MTN
]
;
then
MTN_DIR
=
"
${
DIR
}
/_MTN"
break
fi
DIR
=
`
dirname
${
DIR
}
`
done
# if we didn't find _MTN die
if
[
${#
MTN_DIR
}
-le
0
]
;
then
exit
1
fi
# make sure we have an options file
if
[
!
-f
${
MTN_DIR
}
/options
]
;
then
exit
1
fi
# now attempt to find the db file
DB_FILE
=
`
cat
${
MTN_DIR
}
/options
|
grep
database
|
awk
'{ print $2 }'
|
sed
-s
's/\"//g'
`
if
[
-z
${
DB_FILE
}
]
;
then
exit
1
fi
# we found the db file, print it and exit with a good status
echo
${
DB_FILE
}
exit
0