mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-03 19:23:42 +01:00
rcp: trim // to / and allow only single target
This commit is contained in:
@@ -85,12 +85,13 @@ CPSOURCE="${2}"
|
|||||||
CPDEST="${3}"
|
CPDEST="${3}"
|
||||||
|
|
||||||
bastille_root_check
|
bastille_root_check
|
||||||
set_target "${TARGET}"
|
set_target_single "${TARGET}"
|
||||||
|
|
||||||
for _jail in ${JAILS}; do
|
for _jail in ${JAILS}; do
|
||||||
info "[${_jail}]:"
|
info "[${_jail}]:"
|
||||||
bastille_jail_path="${bastille_jailsdir}/${_jail}/root"
|
host_path="${CPDEST}"
|
||||||
if ! cp "${OPTION}" "${bastille_jail_path}${CPSOURCE}" "${CPDEST}"; then
|
jail_path="$(echo ${bastille_jailsdir}/${_jail}/root/${CPSOURCE} | sed 's#//#/#g')"
|
||||||
error_continue "RCP failed: ${bastille_jail_path}${CPSOURCE} -> ${CPDEST}"
|
if ! cp "${OPTION}" "${jail_path}" "${host_path}"; then
|
||||||
|
error_continue "RCP failed: ${jail_path} -> ${host_path}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user