mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-12-20 04:57:49 +08:00
11 lines
381 B
Bash
Executable File
11 lines
381 B
Bash
Executable File
#!/bin/bash
|
|
|
|
THIS_DIR=$( cd "$( dirname "${BASH_SOURCE[0]:-${(%):-%x}}" )" && pwd )
|
|
source "$THIS_DIR/../tools/common.sh"
|
|
|
|
if [[ -z "$1" || "$1" =~ ^(-h|--help)$ ]]; then
|
|
fmt_info "usage: $0 <container>"
|
|
else
|
|
$SUDO docker exec -it $1 sh -c 'if [ -x "$(command -v zsh)" ]; then zsh; elif [ -x "$(command -v bash)" ]; then echo "-->bash"; bash; else echo "-->sh"; sh; fi'
|
|
fi
|