mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-24 11:12:12 +01:00
Merge pull request #710 from yaazkal/fix-cp-rcp
[FIX] cp and rcp commands not handling the quiet option correctly
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user