Skip to content

Commit

Permalink
feat(build): Output hints about how to compile from repo snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Jul 18, 2020
1 parent 9e27c1f commit 596cd9f
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
#!/usr/bin/env sh
set -e

incomplete_source () {
echo -e "$1. Please either:\n" \
"* $2,\n" \
"* or use the source packages instead of a repo archive\n" \
"* or use a full Git clone.\n" >&2
exit 1
}

# We neet a local copy of the libtexpdf library to compile. If this was
# downloaded as a src distibution package this will exist already, but if not
# and we are part of a git repository that the user has not fully initialized,
# go ahead and do the step of fetching the the submodule so the compile process
# can run.
if [ ! -f "libtexpdf/configure.ac" ] && [ -e ".git" ]; then
git submodule update --init --recursive --remote
if [ ! -f "libtexpdf/configure.ac" ]; then
if [ -e ".git" ]; then
git submodule update --init --recursive --remote
else
incomplete_source "No libtexpdf sources found" \
"download and extract a copy yourself"
fi
fi

# Make
# directory. This enables easy building from Github's snapshot archives
if [ ! -e ".git" ] && [ ! -f ".tarball-version" ]; then
incomplete_source "No version information found" \
"identify the correct version with \`echo \$version > .tarball-version\`"
fi

touch -t 197001010200 Makefile-distfiles
Expand Down

0 comments on commit 596cd9f

Please sign in to comment.