Skip to content

Commit

Permalink
Update: paring arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Drazzilb08 committed Feb 18, 2024
1 parent a923909 commit 2045087
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions modules/bash_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ def set_cmd_args(settings, bash_script_file, logger, script_name):
cmd.append(shlex.quote(str(data_dir)))

if include:
quoted_include = ' '.join(shlex.quote(s) for s in include)
include = ",".join([f"'{i}'" for i in include])
cmd.append('-i')
cmd.append(quoted_include)
cmd.append(include)

if exclude:
quoted_exclude = ' '.join(shlex.quote(s) for s in exclude)
exclude = ",".join([f"'{i}'" for i in exclude])
cmd.append('-e')
cmd.append(quoted_exclude)
cmd.append(exclude)

if script_name in ['backup_appdata', 'backup_plex']:
use_config_file = None
Expand Down
2 changes: 1 addition & 1 deletion scripts/nohl_bash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ handle_options() {
while getopts ":s:i:e:w:n:h" opt; do
case $opt in
s) source_dir="$OPTARG" ;;
i) IFS=' ' read -ra include <<< "$OPTARG" ;;
i) IFS=',' read -r -a include <<< "$OPTARG" ;;
e) exclude+=("$OPTARG") ;;
w) webhook="$OPTARG" ;;
n) bot_name="$OPTARG" ;;
Expand Down

0 comments on commit 2045087

Please sign in to comment.