[VOL-5321] - Add repo:onf-make as a git submodule.
Makefile
lf/transition.mk
----------------
o Add bridge logic to conditionally load legacy makefiles or repo:onf-make.
o transition.mk allows logic to gradually be replaced.
o makefiles/ directory can eventually be removed after all
dependencies on local makefile logic have been removed.
makefiles/
----------
o Replace make var(s) ONF_MAKEDIR= and ONF_MAKE= with var legacy-mk=.
makefiles/commands/include.mk
makefiles/commands/kail/godownloader.sh
---------------------------------------
o Replace loading legacy kail logic with library makefiles.
o Git submodule scripts contain linting cleanup for scripts.
Signed-off-by: Joey Armstrong <jarmstrong@linuxfoundation.org>
Change-Id: I152251039fc3b330ed1a6729922e465c53d00879
diff --git a/makefiles/commands/kail/godownloader.sh b/makefiles/commands/kail/godownloader.sh
index 77ad5bf..63354bb 100755
--- a/makefiles/commands/kail/godownloader.sh
+++ b/makefiles/commands/kail/godownloader.sh
@@ -1,8 +1,25 @@
#!/bin/sh
-set -e
+# -----------------------------------------------------------------------
+# SPDX-License-Identifier: LicenseRef-MIT
+# SPDX-FileCopyrightText: Copyright (c) 2017-2019 Nick Galbreath
+# -----------------------------------------------------------------------
# Code generated by godownloader on 2019-05-28T19:49:53Z. DO NOT EDIT.
# Copyright 2019 - (disable makefiles/lint/license.mk)
-#
+# -----------------------------------------------------------------------
+# Intent:
+# https://pkg.go.dev/github.com/golangci/godownloader
+# https://github.com/boz/kail/blob/v0.15.1/godownloader.sh
+# https://github.com/golangci/godownloader/blob/8788aabdf9391ad712052a4185e8047f8c2fcac5/LICENSE.md
+# -----------------------------------------------------------------------
+# Background:
+# o The project has been deendent on godwnloader.sh to install kail.
+# o godownloader.sh was deprecated, replaced by goreleaser.
+# o A static of the script was checked in, exactly what is needed.
+# o godownloader has been forked, use download if released and persistent:
+# https://github.com/kamilsk/godownloader
+# -----------------------------------------------------------------------
+
+set -e
usage() {
this=$1
@@ -39,6 +56,7 @@
shift $((OPTIND - 1))
TAG=$1
}
+
# this function wraps all the destructive operations
# if a curl|bash cuts off the end of the script due to
# network, either nothing will happen or will syntax error
@@ -122,16 +140,20 @@
but credit (and pull requests) appreciated.
------------------------------------------------------------------------
EOF
+
is_command() {
command -v "$1" >/dev/null
}
echoerr() {
echo "$@" 1>&2
}
+
log_prefix() {
+ # shellcheck disable=SC2317
echo "$0"
}
_logp=6
+
log_set_priority() {
_logp="$1"
}
@@ -190,7 +212,7 @@
armv6*) arch="armv6" ;;
armv7*) arch="armv7" ;;
esac
- echo ${arch}
+ echo "${arch}"
}
uname_os_check() {
os=$(uname_os)