Skip to content

Commit

Permalink
Attempt to download missing submodules as workaround for githubs lack…
Browse files Browse the repository at this point in the history
… of support for submodules in tarballs.
  • Loading branch information
ayyi committed Dec 14, 2014
1 parent 67c3046 commit 668b234
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
30 changes: 28 additions & 2 deletions autogen.sh
@@ -1,14 +1,40 @@
#!/bin/sh

SETCOLOR_WARN="echo -en \\033[1;33m"
SETCOLOR_FAILURE="echo -en \\033[1;31m"
SETCOLOR_NORMAL="echo -en \\033[0;39m"

echo 'Generating necessary files...'
libtoolize --automake
aclocal
autoheader -Wall
automake --gnu --add-missing -Wall
autoconf

cd lib/waveform
./autogen.sh
# github does not support tarballs with submodules. This is a workaround
if [ ! -f lib/waveform/autogen.sh ]; then
${SETCOLOR_WARN}
echo "libwaveform submodule missing"
${SETCOLOR_NORMAL}
if [ ! -d .git ]; then
echo "attempting to download libwaveform ..."
dir=`pwd`
cd lib/waveform && git clone https://github.com/ayyi/libwaveform.git || exit 1
if [ ! -f libwaveform/autogen.sh ]; then
${SETCOLOR_FAILURE}
echo "failed to download libwaveform submodule"
${SETCOLOR_NORMAL}
exit 1
fi
mv libwaveform/* libwaveform/.git . && rmdir libwaveform
cd "$dir"
else
exit 1
fi
fi

cd lib/waveform &&
./autogen.sh &&
cd ../..

#test -n "$NOCONFIGURE" || "$srcdir/configure" --enable-maintainer-mode "$@"
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -5,6 +5,7 @@ AC_CONFIG_HEADER([config.h])
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AM_PROG_AR

# LT_REVISION=1

Expand Down

0 comments on commit 668b234

Please sign in to comment.