2019-11-08 15:14:43 +03:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
if [ -z "$SEMMLE_PLATFORM" ]
|
|
|
|
then
|
|
|
|
case "$OSTYPE" in
|
|
|
|
linux*) SEMMLE_PLATFORM="linux";;
|
2022-03-29 01:42:10 +03:00
|
|
|
darwin*) SEMMLE_PLATFORM="osx64";;
|
2019-11-08 15:14:43 +03:00
|
|
|
msys*) SEMMLE_PLATFORM="win";;
|
|
|
|
*) echo "This script only works on Linux, macOS and msys; OSTYPE: $OSTYPE" && exit 1
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$SEMMLE_PLATFORM" = "win" ]
|
|
|
|
then
|
|
|
|
EXE=".exe"
|
|
|
|
else
|
|
|
|
EXE=""
|
|
|
|
fi
|
|
|
|
|
|
|
|
run() {
|
|
|
|
cmd=$1
|
|
|
|
shift
|
2022-03-29 01:42:10 +03:00
|
|
|
"$SCRIPTDIR/$SEMMLE_PLATFORM/$cmd$EXE" "$@"
|
2019-11-08 15:14:43 +03:00
|
|
|
}
|