smol/autogen.sh

49 lines
776 B
Bash
Raw Normal View History

#!/bin/sh
2016-04-18 03:39:07 +00:00
# Generate configure & friends for GIT users.
gnulib_url="git://git.sv.gnu.org/gnulib.git"
2017-04-04 19:07:16 +00:00
gnulib_hash="06d9e7302a736d7fa3db9cf1eb9850b60aee612f"
modules="
futimens
getdelim
getline
getopt-gnu
glob
isblank
iswblank
lstat
nl_langinfo
regex
sigaction
snprintf-posix
stdarg
strcase
strcasestr-simple
strnlen
sys_wait
vsnprintf-posix
wchar
wctype-h
wcwidth
"
# Make sure the local gnulib git repo is up-to-date.
if [ ! -d "gnulib" ]; then
git clone --depth=123 ${gnulib_url}
fi
cd gnulib >/dev/null || exit 1
curr_hash=$(git log -1 --format=%H)
if [ "${gnulib_hash}" != "${curr_hash}" ]; then
git pull
git checkout -f ${gnulib_hash}
fi
cd .. >/dev/null || exit 1
rm -rf lib
./gnulib/gnulib-tool \
--import \
${modules}
autoreconf -f -i -s