#!/usr/bin/env bash
# winezgui-shortcuts-create
winezgui-shortcuts-create()
{
  dbug "I: $(basename ${0}): Launched ${FUNCNAME[0]}"
    
  SOURCE "script-check-variables-loaded-or-not"
  script-check-variables-loaded-or-not
  SOURCE "winezgui-list-available-prefixes"
  winezgui-list-available-prefixes
  #
  #SCRIPT_NAME=$(basename ${SELECTED_PREFIX})
  # find existing script files and select one of them to be used as template for new shortcut
  SCRIPT_NAME=$(grep "Script:" ${SELECTED_PREFIX}/Info.yml|cut -f2 -d ":"|head -n1)

  echo "${SCRIPT_NAME} is selected"
  # Create shortcut, but Create a copy of scriptfile and make changes in that script
  echo "trying to launch \"${SELECTED_PREFIX}/${SCRIPT_NAME} shortcut\""
  ${SCRIPT_NAME} shortcut
}
