Skip to content

Commit

Permalink
Use uname command to detect Darwin platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilledheart committed Jun 8, 2014
1 parent 41e8968 commit 9ee615b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
: ${AUTOHEADER=autoheader}
: ${AUTOMAKE=automake}
: ${ACLOCAL=aclocal}
if test "${TERM_PROGRAM}" != "Apple_Terminal" ; then
if test "$(uname)" != "Darwin"; then
: ${LIBTOOLIZE=libtoolize}
else
: ${LIBTOOLIZE=glibtoolize}
Expand Down Expand Up @@ -51,7 +51,7 @@ DIE=0
DIE=1
}

if [[ ! ${TERM_PROGRAM} =~ ^Apple ]] ; then
if test "$(uname)" != "Darwin"; then
(grep "^AC_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
echo
Expand All @@ -75,7 +75,7 @@ if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
GETTEXTIZE="gettextize"
GETTEXTIZE_URL="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
fi

$GETTEXTIZE --version < /dev/null > /dev/null 2>&1
if test $? -ne 0; then
echo
Expand All @@ -97,7 +97,7 @@ aclocalinclude="$aclocalinclude -I m4"

if test x"$MSYSTEM" = x"MINGW32"; then
aclocalinclude="$aclocalinclude -I /local/share/aclocal"
elif [[ ${TERM_PROGRAM} =~ ^Apple ]] ; then
elif test "$(uname)" = "Darwin"; then
aclocalinclude="$aclocalinclude -I /opt/local/share/aclocal"
fi

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ else
fi

AC_MSG_CHECKING(for Mac)
if test "$TERM_PROGRAM" = "Apple_Terminal"; then
if test "$(uname)" = "Darwin"; then
bmac=true
AC_MSG_RESULT(compile in mac)
else
Expand Down
4 changes: 2 additions & 2 deletions updateversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
if [ $# != "2" ]; then
echo "$0 <old_version> <new_version>"
exit
fi
fi

old_ver=$1
new_ver=$2

if [[ "${TERM_PROGRAM}" =~ ^Apple ]]; then
if test "$(uname)" = "Darwin"; then
sed -i '' -e "s|$old_ver|$new_ver|" web/setup_mac.py
sed -i '' -e "s|VERSION=$old_ver|VERSION=$new_ver|" setupmac.sh
sed -i '' -e "s|<string>$old_ver</string>|<string>$new_ver</string>|" gui/mac/seafile/seafile/*.plist
Expand Down

0 comments on commit 9ee615b

Please sign in to comment.