updating usage and standardizing target variable

This commit is contained in:
Christer Edwards
2019-11-22 22:01:43 -07:00
parent d9f4972f59
commit 3297457129
+4 -4
View File
@@ -32,7 +32,7 @@
. /usr/local/etc/bastille/bastille.conf . /usr/local/etc/bastille/bastille.conf
usage() { usage() {
echo -e "${COLOR_RED}Usage: bastille cp [ALL|glob] /path/to/source path/to/dest.${COLOR_RESET}" echo -e "${COLOR_RED}Usage: bastille cp TARGET HOST_PATH CONTAINER_PATH${COLOR_RESET}"
exit 1 exit 1
} }
@@ -51,11 +51,11 @@ TARGET="${1}"
CPSOURCE="${2}" CPSOURCE="${2}"
CPDEST="${3}" CPDEST="${3}"
if [ "$TARGET" = 'ALL' ]; then if [ "${TARGET}" = 'ALL' ]; then
JAILS=$(jls name) JAILS=$(jls name)
fi fi
if [ "$TARGET" != 'ALL' ]; then if [ "${TARGET}" != 'ALL' ]; then
JAILS=$(jls name | grep -w "${1}") JAILS=$(jls name | grep -w "${TARGET}")
fi fi
for _jail in ${JAILS}; do for _jail in ${JAILS}; do