Skip to content

Commit

Permalink
Added 'all' and 'server alias' logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed Akerboom committed Dec 11, 2018
1 parent 4984739 commit a1e7d3e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion bin/db-log
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,25 @@ bin=$(dirname "$0")

if [ "${3}" = "--help" ]; then
echo "USAGE:"
echo " ${COLOR_LIGHT_BLUE}db log${COLOR_NC}"
echo " ${COLOR_LIGHT_BLUE}db log [server alias | all]${COLOR_NC}"
echo ""
echo "Prints a list of recorded database dumps"
exit 1
fi

alias="${2}"
all=0
if [ "${3}" = "all" ]; then
all=1
fi

for s in ${servers}
do
if [ "${all}" = "0" ]; then
if [ "${alias}" != "${s}" ]; then
continue;
fi
fi
echo "[${COLOR_YELLOW}${s}${COLOR_NC}]"

dumps="${repository}/${s}/dumps"
Expand Down

0 comments on commit a1e7d3e

Please sign in to comment.