aboutsummaryrefslogtreecommitdiff
path: root/utils.sh
diff options
context:
space:
mode:
authorIlya Kitaev <mbg033@gmail.com>2016-09-23 00:08:08 +0300
committerIlya Kitaev <mbg033@gmail.com>2016-09-23 00:08:08 +0300
commit3abee20196f1eae58268b5eebb85d952ebc78200 (patch)
tree85defaacf7eda100723d94e6c91cd42fdd7ddbca /utils.sh
parentaf30cfdd6ef9f2b44a1ab9aa8b410ca3a98e298e (diff)
downloadmonzero-gui-3abee20196f1eae58268b5eebb85d952ebc78200.tar.gz
monzero-gui-3abee20196f1eae58268b5eebb85d952ebc78200.tar.xz
monzero-gui-3abee20196f1eae58268b5eebb85d952ebc78200.zip
build: get_platform function reused
Diffstat (limited to 'utils.sh')
-rwxr-xr-xutils.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/utils.sh b/utils.sh
new file mode 100755
index 00000000..d6132941
--- /dev/null
+++ b/utils.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+
+function get_platform {
+ local platform="unknown"
+ if [ "$(uname)" == "Darwin" ]; then
+ platform="darwin"
+ elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
+ platform="linux"
+ elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then
+ platform="mingw64"
+ elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
+ platform="mingw32"
+ fi
+ echo "$platform"
+
+}
+
+
+
+
+
+
+
+
+
+
+
+