mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-06 04:34:19 +01:00
Display return status on bastille cp batch/loop
This commit is contained in:
@@ -61,11 +61,13 @@ fi
|
|||||||
for _jail in ${JAILS}; do
|
for _jail in ${JAILS}; do
|
||||||
bastille_jail_path="$(jls -j "${_jail}" path)"
|
bastille_jail_path="$(jls -j "${_jail}" path)"
|
||||||
echo -e "${COLOR_GREEN}[${_jail}]:${COLOR_RESET}"
|
echo -e "${COLOR_GREEN}[${_jail}]:${COLOR_RESET}"
|
||||||
# Add line break and return status
|
cp -av "${CPSOURCE}" "${bastille_jail_path}/${CPDEST}"
|
||||||
if cp -av "${CPSOURCE}" "${bastille_jail_path}/${CPDEST}"; then
|
RETURN="$?"
|
||||||
echo
|
if [ "${TARGET}" = "ALL" ]; then
|
||||||
|
# Display the return status for reference
|
||||||
|
echo -e "Returned: ${RETURN}\n"
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
false
|
return "${RETURN}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user