Skip to content

Instantly share code, notes, and snippets.

@AtsushiA
Forked from shimakyohsuke/init.sh
Created June 29, 2016 02:42
Show Gist options
  • Save AtsushiA/1d3093eb9563dfc812a1f967fed854c2 to your computer and use it in GitHub Desktop.
Save AtsushiA/1d3093eb9563dfc812a1f967fed854c2 to your computer and use it in GitHub Desktop.
Wocker でコンテナ立ち上げ後に実効するやつ
#!/bin/bash
shopt -s expand_aliases
source ~/.bash_profile
## 日本語化
wocker wp core language install ja
wocker wp core language activate ja
## いろいろなプラグインをインストール
echo "いろいろなプラグインをインストールしますか? [Y/N]"
read ANSWER1
case $ANSWER1 in
"" | "Y" | "y" | "yes" | "Yes" | "YES" )
wocker wp plugin install wp-multibyte-patch \
theme-check \
debug-bar \
debug-bar-extender \
--activate
;;
* ) echo "plugin Done!";;
esac
## テーマユニットテストデータのインストール
echo "テーマユニットテストデータをインストールしますか? [Y/N]"
read ANSWER2
case $ANSWER2 in
"" | "Y" | "y" | "yes" | "Yes" | "YES" ) wocker theme-test ja && echo "Theme Test Data install Done!!";;
* ) echo "init Done!";;
esac
## 西川さんが作成したテーマユニットテストデータのインストール
echo "西川さんが作成したテーマユニットテストデータをインストールしますか? [Y/N]"
read ANSWER3
case $ANSWER3 in
"" | "Y" | "y" | "yes" | "Yes" | "YES" )
cid=$(docker ps -q)
url='https://raw.githubusercontent.com/shimakyohsuke/wocker_wp_post_create/master/content-area-markup.txt'
docker exec -u wocker $cid curl -OL $url && \
wocker wp post create ${url##*/} --post_title='西川さんが作成したテーマユニットテストデータ' --post_status=publish && \
echo "西川さんが作成したテーマユニットテストデータ install Done!!"
;;
* ) echo "init Done!";;
esac
## オプション
wocker wp option update timezone_string 'Asia/Tokyo'
wocker wp option update date_format 'Y年n月j日'
wocker wp option update time_format 'H:i'
## プラグインとテーマのアプデ
wocker wp plugin update-all
wocker wp theme update-all
## 翻訳ファイルのアプデ
wocker wp core language update
## 日本語コアファイルのアプデ
wocker wp core update --locale=ja --force
wocker wp core update-db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment