gnu-social/bin/translate_container_name.sh

10 lines
170 B
Bash
Raw Normal View History

#!/bin/sh
translate_container_name () {
if docker container inspect "$1" > /dev/null 2>&1; then
echo "$1"
else
echo "$1" | sed 'y/_/-/'
fi
}