Skip to content

Commit

Permalink
support for CygWin or MinGW
Browse files Browse the repository at this point in the history
  • Loading branch information
soldni authored Jan 6, 2019
1 parent 86d1678 commit 2ebd244
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions setup_simstring.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [[ ! -z "$2" ]]
then
RELEASE_VERSION="$2"
else
RELEASE_VERSION="1.1.3"
RELEASE_VERSION="1.1.4"
fi
RELEASE_FILENAME="${RELEASE_VERSION}.tar.gz"

Expand Down Expand Up @@ -53,6 +53,7 @@ curl -O -L $RELEASE_URL

echo "Unpacking Simstring..."
tar -xf $RELEASE_FILENAME

rm -rf $RELEASE_FILENAME
RELEASE_FOLDER="simstring-${RELEASE_VERSION}"

Expand All @@ -70,7 +71,17 @@ echo "Installing..."
cd ..
mkdir 'simstring'
touch 'simstring/__init__.py'
cp ${RELEASE_FOLDER}/_*.so simstring/

PLATFORM="$(uname -s)"

if [[ $PLATFORM == *"CYGWIN"* || $PLATFORM == *"MINGW"* ]]; then
# we are on a NT system, so building creates DLLs
cp ${RELEASE_FOLDER}/_*.dll simstring/
else
# *nix system, so bulding stuff createsd SOs
cp ${RELEASE_FOLDER}/_*.so simstring/
fi

cp ${RELEASE_FOLDER}/simstring.py simstring/simstring.py

# remove remaining files
Expand Down

0 comments on commit 2ebd244

Please sign in to comment.