Skip to content

Commit

Permalink
build-deps.sh: use mktemp and cleanup afterwards
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Jul 21, 2022
1 parent 2bb4bad commit 4aebfb5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
set -e

[ -z "$VERSION" ] && VERSION=stable
[ -z "$PREFIX" ] && [ -n "$1" ] && PREFIX=$1
[ -z "$PREFIX" ] && PREFIX=/usr/local

if [ "$VERSION" = "stable" ]; then
Expand All @@ -18,6 +19,9 @@ else
echo "-----------------------------------------------------------------------">&2
fi

PWD="$(pwd)"
BUILDDIR="$(mktemp -dt "build-deps.XXXXXX")"
cd "$BUILDDIR"
BUILD_SOURCES="LanguageMachines/ticcutils LanguageMachines/libfolia LanguageMachines/uctodata LanguageMachines/ucto LanguageMachines/timbl LanguageMachines/mbt LanguageMachines/timblserver LanguageMachines/mbtserver LanguageMachines/frogdata"
for SUFFIX in $BUILD_SOURCES; do \
NAME="$(basename "$SUFFIX")"
Expand All @@ -30,3 +34,5 @@ for SUFFIX in $BUILD_SOURCES; do \
sh ./bootstrap.sh && ./configure --prefix "$PREFIX" && make && make install
cd ..
done
cd "$PWD"
[ -n "$BUILDDIR" ] && rm -Rf "$BUILDDIR"

0 comments on commit 4aebfb5

Please sign in to comment.