My guess is that this is incomplete… and that should read something like,
echo “usage script arguments”
I don’t have VMWARE to test but you can check:
#!/usr/bin/env bash
export LANG=C
COMMAND="$1"
KERNEL_VERSION="$2"
#The below arguements don't appear to be utilized.
BOOT_DIR_ABS="$3"
KERNEL_IMAGE="$4"
ret=0
case "$COMMAND" in
add)
VMWARE_VERSION=$(cat /etc/vmware/config | grep player.product.version | sed '/.*\"\(.*\)\".*/ s//\1/g')
#Exit if VMWARE version can not be found or if kernel version is not provided
if [ -z ${VMWARE_VERSION} ] || [ -z ${KERNEL_VERSION} ]; then
echo "NO VMWARE VERSION OR KERNEL VERSION PROVIDED"
ret=1
else
#clone and update kernel modules
mkdir -p /tmp/git; cd /tmp/git
git clone -b workstation-${VMWARE_VERSION} https://github.com/mkubecek/vmware-host-modules.git
cd vmware-host-modules
make VM_UNAME=${KERNEL_VERSION}
make install VM_UNAME=${KERNEL_VERSION}
#exit with the status of the last command
((ret+=$?))
fi
;;
remove)
#Exit if the remove argument is sent to the script.
exit 0
;;
*)
#Provide usage if script is run without arguments
echo "Usage,99-vmmodules.install add kernel version"
ret=1
;;
esac
exit $ret
Please remember that often items posted like that are guides and not actual functional scripts or commands. They expect the user to be able to interpret what is valid syntax and what they need to modify for their own usage.