Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions wocker
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,19 @@ wocker_theme_test_usage() {
echo ''
echo ' LOCALE Select which language you want to import. `en` and `ja` are available. If omitted, `en` will be imported.'
}
wocker_wordmove_usage() {
echo ''
echo 'Usage: wocker wordmove COMMAND arg'
echo ''
echo 'Execute wordmove commands in the running container'
echo 'See http://welaika.github.io/wordmove/'
echo ''
echo 'Commands:'
echo ' help Describe available tasks or one specific task'
echo ' init Generates a brand new Movefile'
echo ' pull Pulls WP data from remote host to the local machine'
echo ' push Pushes WP data from local machine to remote host'
}

case "$1" in

Expand Down Expand Up @@ -375,6 +388,27 @@ case "$1" in
fi
fi
;;

#
# wocker wp
#
'wordmove' )

if [[ "$2" = '--help' ]]; then
wocker_wordmove_usage
else
if [[ $(docker ps -q) ]]; then
cid=$(docker ps -q)
if [[ ! $cid =~ $'\n' ]]; then
if [[ "$2" = 'shell' ]]; then
docker exec -u $USER -it $cid wordmove ${@:2}
else
docker exec -u $USER $cid wordmove ${@:2}
fi
fi
fi
fi
;;

#
# wocker theme-test
Expand Down