From 3003969a12ff006a574a53236c7d4128616f9b0a Mon Sep 17 00:00:00 2001 From: Ashish Ranjan Date: Sun, 28 Jul 2019 00:38:25 +0530 Subject: [PATCH] style(utils): Rearrange functions lexically --- src/os/utils.sh | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/os/utils.sh b/src/os/utils.sh index db7498b..a8b5dda 100755 --- a/src/os/utils.sh +++ b/src/os/utils.sh @@ -46,6 +46,23 @@ cmd_exists() { } +containsElement () { + + # Check if a bash array contains a value + # https://stackoverflow.com/a/8574392 + + local e match="$1" + shift + + for e; do + [[ "$e" == "$match" ]] \ + && return 0; + done + + return 1 + +} + create_symlink() { local -r sourceFile="$1" @@ -170,23 +187,6 @@ get_answer() { printf "%s" "$REPLY" } -containsElement () { - - # Check if a bash array contains a value - # https://stackoverflow.com/a/8574392 - - local e match="$1" - shift - - for e; do - [[ "$e" == "$match" ]] \ - && return 0; - done - - return 1 - -} - get_os() { local os=""