samples: Refactor setting KONAN_HOME variable

This commit is contained in:
Ilya Matveev
2017-11-15 14:44:24 +07:00
committed by ilmat192
parent b96ede81d2
commit fc5057868b
14 changed files with 21 additions and 66 deletions
+1 -5
View File
@@ -2,11 +2,7 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ -z "$KONAN_HOME" ]; then
PATH="$DIR/../../dist/bin:$DIR/../../bin:$PATH"
else
PATH="$KONAN_HOME/bin:$PATH"
fi
source "$DIR/../konan.sh"
if [ x$TARGET == x ]; then
case "$OSTYPE" in
+1 -5
View File
@@ -2,11 +2,7 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ -z "$KONAN_HOME" ]; then
PATH="$DIR/../../dist/bin:$DIR/../../bin:$PATH"
else
PATH="$KONAN_HOME/bin:$PATH"
fi
source "$DIR/../konan.sh"
CFLAGS_macbook="-I/opt/local/include -I/usr/local/include"
CFLAGS_linux=-I/usr/include
+1 -5
View File
@@ -2,11 +2,7 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ -z "$KONAN_HOME" ]; then
PATH="$DIR/../../dist/bin:$DIR/../../bin:$PATH"
else
PATH="$KONAN_HOME/bin:$PATH"
fi
source "$DIR/../konan.sh"
IPREFIX_macbook=-I/opt/local/include
IPREFIX_linux=-I/usr/include
+2 -6
View File
@@ -2,11 +2,7 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ -z "$KONAN_HOME" ]; then
PATH="$DIR/../../dist/bin:$DIR/../../bin:$PATH"
else
PATH="$KONAN_HOME/bin:$PATH"
fi
source "$DIR/../konan.sh"
if [ x$TARGET == x ]; then
case "$OSTYPE" in
@@ -41,4 +37,4 @@ echo "Artifact path is $DIR/build/bin/html5Canvas.wasm"
echo "Artifact path is $DIR/build/bin/html5Canvas.wasm.js"
echo "Check out $DIR/index.html"
echo "Serve $DIR/ by an http server for the demo"
# For example run: python -m SimpleHTTPServer 8080
# For example run: python -m SimpleHTTPServer 8080
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
if [ -z "$KONAN_HOME" ]; then
PATH="$DIR/../../dist/bin:$DIR/../../bin:$PATH"
else
PATH="$KONAN_HOME/bin:$PATH"
fi
+1 -5
View File
@@ -2,11 +2,7 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ -z "$KONAN_HOME" ]; then
PATH="$DIR/../../dist/bin:$DIR/../../bin:$PATH"
else
PATH="$KONAN_HOME/bin:$PATH"
fi
source "$DIR/../konan.sh"
CFLAGS_macbook=-I/opt/local/include
CFLAGS_linux="-I /usr/include -I /usr/include/x86_64-linux-gnu"
+1 -5
View File
@@ -2,11 +2,7 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ -z "$KONAN_HOME" ]; then
PATH="$DIR/../../dist/bin:$DIR/../../bin:$PATH"
else
PATH="$KONAN_HOME/bin:$PATH"
fi
source "$DIR/../konan.sh"
if [ x$TARGET == x ]; then
case "$OSTYPE" in
+1 -5
View File
@@ -2,11 +2,7 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ -z "$KONAN_HOME" ]; then
PATH="$DIR/../../dist/bin:$DIR/../../bin:$PATH"
else
PATH="$KONAN_HOME/bin:$PATH"
fi
source "$DIR/../konan.sh"
mkdir -p $DIR/build/bin/
+1 -5
View File
@@ -2,11 +2,7 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ -z "$KONAN_HOME" ]; then
PATH="$DIR/../../dist/bin:$DIR/../../bin:$PATH"
else
PATH="$KONAN_HOME/bin:$PATH"
fi
source "$DIR/../konan.sh"
if [ x$TARGET == x ]; then
case "$OSTYPE" in
+1 -5
View File
@@ -2,11 +2,7 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ -z "$KONAN_HOME" ]; then
PATH="$DIR/../../dist/bin:$DIR/../../bin:$PATH"
else
PATH="$KONAN_HOME/bin:$PATH"
fi
source "$DIR/../konan.sh"
mkdir -p $DIR/build/bin/
+1 -5
View File
@@ -2,11 +2,7 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ -z "$KONAN_HOME" ]; then
PATH="$DIR/../../dist/bin:$DIR/../../bin:$PATH"
else
PATH="$KONAN_HOME/bin:$PATH"
fi
source "$DIR/../konan.sh"
$DIR/downloadTensorflow.sh
+1 -5
View File
@@ -2,11 +2,7 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ -z "$KONAN_HOME" ]; then
PATH="$DIR/../../dist/bin:$DIR/../../bin:$PATH"
else
PATH="$KONAN_HOME/bin:$PATH"
fi
source "$DIR/../konan.sh"
DEPS="$HOME/.konan/dependencies"
+1 -5
View File
@@ -2,11 +2,7 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ -z "$KONAN_HOME" ]; then
PATH="$DIR/../../dist/bin:$DIR/../../bin:$PATH"
else
PATH="$KONAN_HOME/bin:$PATH"
fi
source "$DIR/../konan.sh"
mkdir -p $DIR/build/bin/
+1 -5
View File
@@ -2,11 +2,7 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ -z "$KONAN_HOME" ]; then
PATH="$DIR/../../dist/bin:$DIR/../../bin:$PATH"
else
PATH="$KONAN_HOME/bin:$PATH"
fi
source "$DIR/../konan.sh"
SUFFIX=kexe
if [ x$TARGET == x ]; then