Using bash instead of sh

This commit is contained in:
John Zhao
2018-03-09 11:42:45 +08:00
parent f02f892494
commit 0820406313
11 changed files with 29 additions and 27 deletions

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
[ -n "${_DETECT_SH_}" ] && return || readonly _DETECT_SH_=1
[ -n "${_VERBOSE_}" ] && echo "-- INCLUDE: detect.sh"
@@ -13,8 +13,12 @@ _detect() {
exit 1
fi
else
[ -z "$verbose" ] || echo "-- DETECT: $cmd found"
eval "${cmd}_FOUND=1"
if [ -z "$verbose" ]; then
eval "${cmd}_FOUND=1" &> /dev/null
else
echo "-- DETECT: $cmd found"
eval "${cmd}_FOUND=1"
fi
fi
}

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
[ -n "${_ECHO_SH_}" ] && return || readonly _ECHO_SH_=1
[ -n "${_VERBOSE_}" ] && echo "-- INCLUDE: echo.sh"
@@ -9,11 +9,7 @@
# source "$(dirname "$0")/echo.sh"
# fi
if [ "$OS" = "Windows_NT" ]; then
ECHO="echo -e"
else
ECHO="echo"
fi
ECHO="echo -e"
# task colors
COLOR_STRONG="1;35" # Magenta

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
[ -n "${_HOST_SH_}" ] && return || readonly _HOST_SH_=1
[ -n "${_VERBOSE_}" ] && echo "-- INCLUDE: host.sh"

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
[ -n "${_MKDIR_SH_}" ] && return || readonly _MKDIR_SH_=1
[ -n "${_VERBOSE_}" ] && echo "-- INCLUDE: mkdir.sh"

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
FIND="find"

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
# _VERBOSE_=1
# _FORCE_INSRALL_=1
BASE_DIR=$(cd "$(dirname "$0")" && pwd)

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
BASE_DIR=$(cd "$(dirname "$0")" && pwd)