Skip to content

Commit

Permalink
Merge pull request #710 from yaazkal/fix-cp-rcp
Browse files Browse the repository at this point in the history
[FIX] cp and rcp commands not handling the quiet option correctly
  • Loading branch information
yaazkal authored Jul 14, 2024
2 parents 9aeb0ea + bfe413e commit c7f46c3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions usr/local/bin/bastille
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,18 @@ clone|config|cmd|console|convert|cp|edit|htop|limits|mount|pkg|rcp|rename|servic
TARGET="${1}"
shift

# This is needed to handle the special case of 'bastille rcp' and 'bastille cp' with the '-q' or '--quiet'
# option specified before the TARGET. Also seems the cp and rcp commands does not support ALL as a target, so
# that's why is handled here. Maybe this behaviour needs an improvement later. -- yaazkal
if { [ "${CMD}" = 'rcp' ] || [ "${CMD}" = 'cp' ]; } && \
{ [ "${TARGET}" = '-q' ] || [ "${TARGET}" = '--quiet' ]; }; then
TARGET="${1}"
JAILS="${TARGET}"
OPTION="-q"
export OPTION
shift
fi

if [ "${TARGET}" = 'ALL' ]; then
target_all_jails
elif [ "${CMD}" = "pkg" ] && [ "${TARGET}" = '-H' ] || [ "${TARGET}" = '--host' ]; then
Expand Down

0 comments on commit c7f46c3

Please sign in to comment.