Skip to content

Commit 2ebd244

Browse files
authored
support for CygWin or MinGW
1 parent 86d1678 commit 2ebd244

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

setup_simstring.sh

+13-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if [[ ! -z "$2" ]]
1212
then
1313
RELEASE_VERSION="$2"
1414
else
15-
RELEASE_VERSION="1.1.3"
15+
RELEASE_VERSION="1.1.4"
1616
fi
1717
RELEASE_FILENAME="${RELEASE_VERSION}.tar.gz"
1818

@@ -53,6 +53,7 @@ curl -O -L $RELEASE_URL
5353

5454
echo "Unpacking Simstring..."
5555
tar -xf $RELEASE_FILENAME
56+
5657
rm -rf $RELEASE_FILENAME
5758
RELEASE_FOLDER="simstring-${RELEASE_VERSION}"
5859

@@ -70,7 +71,17 @@ echo "Installing..."
7071
cd ..
7172
mkdir 'simstring'
7273
touch 'simstring/__init__.py'
73-
cp ${RELEASE_FOLDER}/_*.so simstring/
74+
75+
PLATFORM="$(uname -s)"
76+
77+
if [[ $PLATFORM == *"CYGWIN"* || $PLATFORM == *"MINGW"* ]]; then
78+
# we are on a NT system, so building creates DLLs
79+
cp ${RELEASE_FOLDER}/_*.dll simstring/
80+
else
81+
# *nix system, so bulding stuff createsd SOs
82+
cp ${RELEASE_FOLDER}/_*.so simstring/
83+
fi
84+
7485
cp ${RELEASE_FOLDER}/simstring.py simstring/simstring.py
7586

7687
# remove remaining files

0 commit comments

Comments
 (0)