# !kmk_ash # $Id: gen-slickedit-workspace.sh 95580 2022-07-09 19:28:19Z vboxsync $ ## @file # Script for generating a SlickEdit workspace. # # The gen-vscode-workspace.sh script is derived from this one, so fixes here # may apply there too. # # # Copyright (C) 2009-2022 Oracle Corporation # # This file is part of VirtualBox Open Source Edition (OSE), as # available from http://www.virtualbox.org. This file is free software; # you can redistribute it and/or modify it under the terms of the GNU # General Public License (GPL) as published by the Free Software # Foundation, in version 2 as it comes in the "COPYING" file of the # VirtualBox OSE distribution. VirtualBox OSE is distributed in the # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. # # # Include code we share with gen-vscode-workspace.sh # MY_SCRIPT_DIR=. case "$0" in */*|*\\*) MY_SCRIPT_DIR=$(echo "$0" | kmk_sed -e 's,[/\][^/\][^/\]*$,,') ;; esac . "${MY_SCRIPT_DIR}/common-gen-workspace.inc.sh" # # Globals. # MY_PROJECT_FILES="" # # Parameters w/ defaults. # MY_OUT_DIR="SlickEdit" MY_PRJ_PRF="VBox-" MY_WS_NAME="VirtualBox.vpw" MY_DBG="" MY_WINDOWS_HOST="" MY_OPT_MINIMAL="" MY_OPT_USE_WILDCARDS="yes" ## # Generate folders for the specified directories and files. # # @param $1 The output (base) file name. # @param $2+ The files and directories to traverse. my_generate_folder() { MY_FILE="$1" shift # Zap existing file collections. > "${MY_FILE}-All.lst" > "${MY_FILE}-Sources.lst" > "${MY_FILE}-Headers.lst" > "${MY_FILE}-Assembly.lst" > "${MY_FILE}-Testcases.lst" > "${MY_FILE}-Others.lst" # Traverse the directories and files. while test $# -ge 1 -a -n "${1}"; do for f in ${MY_ROOT_DIR}/$1; do if test -d "${f}"; then if test -z "${MY_OPT_USE_WILDCARDS}"; then my_sub_tree "${MY_FILE}" "${f}" else case "${f}" in ${MY_ROOT_DIR}/include*) #my_sub_tree "${MY_FILE}" "${f}" "Headers" my_wildcard "${MY_FILE}" "${f}" "Headers" ;; *) my_wildcard "${MY_FILE}" "${f}" ;; esac fi else my_file "${MY_FILE}" "${f}" fi done shift done # Generate the folders. if test -s "${MY_FILE}-All.lst"; then ${MY_SORT} "${MY_FILE}-All.lst" | ${MY_SED} -e 's/