Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destination path accepts backslash #23609

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/macos/generate_wazuh_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ INSTALLATION_PATH="/Library/Ossec" # Installation path.
VERSION="" # Default VERSION (branch/tag).
REVISION="1" # Package revision.
BRANCH_TAG="" # Branch that will be downloaded to build package.
DESTINATION="${CURRENT_PATH}/output/" # Where package will be stored.
DESTINATION="${CURRENT_PATH}/output" # Where package will be stored.
JOBS="2" # Compilation jobs.
VERBOSE="no" # Enables the full log by using `set -exf`.
DEBUG="no" # Enables debug symbols while compiling.
Expand Down Expand Up @@ -171,8 +171,8 @@ function build_package() {
symbols_pkg_name=$(echo "${pkg_name}" | tr '\n' ' ' | cut -d ' ' -f 1)
symbols_pkg_name="${symbols_pkg_name}_debug_symbols"
cp -R "${WAZUH_PATH}/src/symbols" "${DESTINATION}"
zip -r "${DESTINATION}${symbols_pkg_name}.zip" "${DESTINATION}symbols"
rm -rf "${DESTINATION}symbols"
zip -r "${DESTINATION}/${symbols_pkg_name}.zip" "${DESTINATION}/symbols"
rm -rf "${DESTINATION}/symbols"
sign_pkg
if [[ "${CHECKSUM}" == "yes" ]]; then
mkdir -p ${CHECKSUMDIR}
Expand Down Expand Up @@ -294,7 +294,7 @@ function main() {
;;
"-s"|"--store-path")
if [ -n "$2" ]; then
DESTINATION="$2"
DESTINATION=$(echo "$2" | sed 's:/*$::')
shift 2
else
help 1
Expand Down