-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.fun
26 lines (23 loc) · 886 Bytes
/
.fun
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
######################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# SPDX-License-Identifier: MIT-0 #
######################################################################
# Helper functions
## Detect current operating system
function os
{
UNAME=$(uname -a)
if [ $(echo $UNAME | awk '{print $1}') == "Darwin" ]; then
export OPERATING_SYSTEM="MacOS"
elif [ $(echo $UNAME | awk '{print $1}') == "Linux" ]; then
export OPERATING_SYSTEM="Linux"
elif [ ${UNAME:0:5} == "MINGW" ]; then
export OPERATING_SYSTEM="Windows"
export MSYS_NO_PATHCONV=1 # turn off path conversion
else
export OPERATING_SYSTEM="Other"
fi
}
## End os function
os