From b916e1e9fd04770b28008a6aca9988bc7933f9ae Mon Sep 17 00:00:00 2001 From: storypku Date: Thu, 3 Sep 2020 16:31:10 +0800 Subject: [PATCH] Scripts: make docker installer self-contained --- docker/setup_host/install_docker.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/docker/setup_host/install_docker.sh b/docker/setup_host/install_docker.sh index caca824a1f..3282ec1652 100644 --- a/docker/setup_host/install_docker.sh +++ b/docker/setup_host/install_docker.sh @@ -15,11 +15,26 @@ # See the License for the specific language governing permissions and # limitations under the License. ############################################################################### -TOP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd -P)" -source ${TOP_DIR}/scripts/apollo.bashrc ARCH="$(uname -m)" +##==============================================================## +## Note(storypku): DRY broken for this self-contained script. +##==============================================================## +BOLD='\033[1m' +RED='\033[0;31m' +WHITE='\033[34m' +NO_COLOR='\033[0m' + +function info() { + (echo >&2 -e "[${WHITE}${BOLD}INFO${NO_COLOR}] $*") +} + +function error() { + (echo >&2 -e "[${RED}ERROR${NO_COLOR}] $*") +} +##==============================================================## + function install_filesystem_support() { local kernel_version="$(uname -r)" if [ "$kernel_version" == "4.4.32-apollo-2-RT" ]; then -- GitLab