test/vm_setup.sh: use $package_manager var instead of $PACKAGEMNG
When trying to find out parameters through "--help", the $PACKAGEMNG is "undefined". So the output from help does not make sense. Change it so that the help message uses $package_manager that was detected. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Ia7ac47dec810588dfa01441b35204a7bf13280ed Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3049 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Michal Berger <michalx.berger@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
7ea417e5a3
commit
82540a6fd1
@ -37,11 +37,9 @@ fi
|
||||
if [ $(uname -s) == "FreeBSD" ]; then
|
||||
OSID="freebsd"
|
||||
OSVERSION=$(freebsd-version | cut -d. -f1)
|
||||
PACKAGEMNG='pkg'
|
||||
else
|
||||
OSID=$(source /etc/os-release && echo $ID)
|
||||
OSVERSION=$(source /etc/os-release && echo $VERSION_ID)
|
||||
PACKAGEMNG='undefined'
|
||||
fi
|
||||
|
||||
function usage() {
|
||||
@ -50,8 +48,8 @@ function usage() {
|
||||
echo ""
|
||||
echo "./vm_setup.sh"
|
||||
echo " -h --help"
|
||||
echo " -u --upgrade Run $PACKAGEMNG upgrade"
|
||||
echo " -i --install-deps Install $PACKAGEMNG based dependencies"
|
||||
echo " -u --upgrade Run $package_manager upgrade"
|
||||
echo " -i --install-deps Install $package_manager based dependencies"
|
||||
echo " -t --test-conf List of test configurations to enable (${CONF})"
|
||||
echo " -c --conf-path Path to configuration file"
|
||||
echo " -d --dir-git Path to where git sources should be saved"
|
||||
@ -77,6 +75,7 @@ elif hash pkg &> /dev/null; then
|
||||
else
|
||||
echo "Supported package manager not found. Script supports:"
|
||||
printf ' * %s\n' "${managers[@]##*/}"
|
||||
package_manager="undefined"
|
||||
fi
|
||||
|
||||
# Parse input arguments #
|
||||
|
Loading…
Reference in New Issue
Block a user