From 0d1600875439306635d91027f0c66eb11551b2fa Mon Sep 17 00:00:00 2001 From: Felix Hoffmann Date: Thu, 1 Feb 2024 22:26:44 +0100 Subject: [PATCH] assemble: fix Split multiple apps and bins by space (#1084) * fix(assemble): split multiple apps and bins by space * fix(assemble): remove unnecessary trim for export --- distrobox-assemble | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/distrobox-assemble b/distrobox-assemble index a1a17728bc..02d99febaf 100755 --- a/distrobox-assemble +++ b/distrobox-assemble @@ -374,15 +374,23 @@ run_distrobox() ( "${distrobox_path}"/distrobox enter "${name}" -- touch /dev/null IFS="¤" - for app in ${exported_apps}; do - app="$(echo "${app}" | tr -d '[:space:]')" - "${distrobox_path}"/distrobox enter "${name}" -- distrobox-export --app "${app}" + for apps in ${exported_apps}; do + # Split the string by spaces + IFS=" " + for app in ${apps}; do + # Export the app + "${distrobox_path}"/distrobox enter "${name}" -- distrobox-export --app "${app}" + done done IFS="¤" - for bin in ${exported_bins}; do - bin="$(echo "${bin}" | tr -d '[:space:]')" - "${distrobox_path}"/distrobox enter "${name}" -- distrobox-export --bin "${bin}" --export-path "${exported_bins_path}" + for bins in ${exported_bins}; do + # Split the string by spaces + IFS=" " + for bin in ${bins}; do + # Export the bin + "${distrobox_path}"/distrobox enter "${name}" -- distrobox-export --bin "${bin}" --export-path "${exported_bins_path}" + done done fi )