-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nosheen Adil
committed
Nov 13, 2024
1 parent
c1def9b
commit 1eed71c
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Detects if macOS | ||
isMac() | ||
{ | ||
[ "$(uname)" == "Darwin" ] | ||
} | ||
|
||
# Detects if Linux OS | ||
isLinux() | ||
{ | ||
[ "$(expr substr $(uname -s) 1 5)" == "Linux" ] | ||
} | ||
|
||
# Detects if Ubuntu OS | ||
isUbuntu() | ||
{ | ||
[ "$(expr substr $(awk -F= '/^NAME/{print $2}' /etc/os-release) 2 6)" == "Ubuntu" ] | ||
} | ||
|
||
# Detects if Windows OS | ||
isWin() | ||
{ | ||
[ "$(expr substr $(uname) 1 5)" == "MINGW" ] | ||
} | ||
|
||
# Detects if arm architecture | ||
isArm() | ||
{ | ||
[ "$(arch)" == "aarch64" ] | ||
} |