2
# Copyright (C) 2003-2004, 2006 MySQL AB
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; version 2 of the License.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
# The default path should be /usr/local
19
# Get some info from configure
20
# chmod +x ./scripts/setsomevars
22
machine=@MACHINE_TYPE@
25
export machine system version
40
--tmp=*) TMP=`echo "$arg" | sed -e "s;--tmp=;;"` ;;
41
--suffix=*) SUFFIX=`echo "$arg" | sed -e "s;--suffix=;;"` ;;
42
--no-strip) STRIP=0 ;;
45
echo "Unknown argument '$arg'"
54
BASE=$TMP/my_dist$SUFFIX
56
if [ -d $BASE ] ; then
63
libmysql/.libs/libmysqlclient.so* \
64
libmysql/.libs/libmysqlclient.sl* \
65
libmysql/.libs/libmysqlclient*.dylib \
66
libmysql_r/.libs/libmysqlclient_r.so* \
67
libmysql_r/.libs/libmysqlclient_r.sl* \
68
libmysql_r/.libs/libmysqlclient_r*.dylib
76
# Change the distribution to a long descriptive name
77
NEW_NAME=mysql-shared-$version-$system-$machine$SUFFIX
83
#if we are debugging, do not do tar/gz
84
if [ x$DEBUG = x1 ] ; then
88
# This is needed to prefer GNU tar instead of tar because tar can't
89
# always handle long filenames
91
PATH_DIRS=`echo $PATH | sed -e 's/^:/. /' -e 's/:$/ ./' -e 's/::/ . /g' -e 's/:/ /g' `
100
if test -x $file -a ! -d $file
112
# Create the result tar file
115
tar=`which_1 gnutar gtar`
116
if test "$?" = "1" -o "$tar" = ""
121
echo "Using $tar to create archive"
125
if [ x$SILENT = x1 ] ; then
129
$tar $OPT $SOURCE/$NEW_NAME.tar $NEW_NAME
131
echo "Compressing archive"
132
gzip -9 $NEW_NAME.tar
133
echo "Removing temporary directory"
136
echo "$NEW_NAME.tar.gz created"