#!/bin/bash
#
# Copyright 2023 VMware, Inc.  All rights reserved.
#
# This script manages the appstub application for file association
#

libpath="/usr/lib/vmware"
binpath="/usr/lib/vmware/view/bin"

# Add path to LD_LIBRARY_PATH
vm_append_to_library_path() {
   local ldBasePath
   if [ ! -z "$LD_LIBRARY_PATH" ]; then
      ldBasePath="$LD_LIBRARY_PATH"
   fi
   export LD_LIBRARY_PATH="$1:""$ldBasePath"
}

vm_append_to_library_path "$libpath"/gcc

# Launch vmware application stub binary
"$binpath/vmware-appstub" "$@" &
