-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
|
||
# Builds necessary dependencies from source | ||
|
||
set -e | ||
|
||
[ -z "$VERSION" ] && VERSION=stable | ||
[ -z "$PREFIX" ] && [ -n "$1" ] && PREFIX=$1 | ||
[ -z "$PREFIX" ] && PREFIX=/usr/local | ||
|
||
if [ "$VERSION" = "stable" ]; then | ||
echo "------------------------------------------------------------------------">&2 | ||
echo " Building latest stable release of main dependencies from source.">&2 | ||
echo "------------------------------------------------------------------------">&2 | ||
else | ||
echo "------------------------------------------------------------------------">&2 | ||
echo " Building development versions of main dependencie from source.">&2 | ||
echo " (This is experimental and may contain bugs! DO NOT PUBLISH!)">&2 | ||
echo "-----------------------------------------------------------------------">&2 | ||
fi | ||
|
||
PWD="$(pwd)" | ||
BUILDDIR="$(mktemp -dt "build-deps.XXXXXX")" | ||
cd "$BUILDDIR" | ||
BUILD_SOURCES="LanguageMachines/ticcutils LanguageMachines/libfolia LanguageMachines/uctodata LanguageMachines/ucto" | ||
for SUFFIX in $BUILD_SOURCES; do \ | ||
NAME="$(basename "$SUFFIX")" | ||
git clone "https://github.com/$SUFFIX" | ||
cd "$NAME" | ||
REF=$(git tag -l | grep -E "^v?[0-9]+(\.[0-9])*" | sort -t. -k 1.2,1n -k 2,2n -k 3,3n -k 4,4n | tail -n 1) | ||
if [ "$VERSION" = "stable" ] && [ -n "$REF" ]; then | ||
git -c advice.detachedHead=false checkout "$REF" | ||
fi | ||
sh ./bootstrap.sh && ./configure --prefix "$PREFIX" && make && make install | ||
cd .. | ||
done | ||
cd "$PWD" | ||
[ -n "$BUILDDIR" ] && rm -Rf "$BUILDDIR" |