Skip to content

Commit

Permalink
install-theme.sh 戻し
Browse files Browse the repository at this point in the history
  • Loading branch information
kurudrive committed Aug 19, 2024
1 parent 25f9e4d commit 8479420
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions bin/install-theme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,11 @@

set -ex

# テーマのダウンロード
curl -sf https://downloads.wordpress.org/theme/lightning.zip -o theme.zip

# ダウンロードが成功したか確認
if [ $? -ne 0 ]; then
echo "Error: Theme download failed."
exit 1
fi

# テーマを展開するディレクトリの作成
mkdir -p ./temp/

# テーマの解凍
unzip theme.zip -d ./temp/themes

# 解凍が成功したか確認
if [ $? -ne 0 ]; then
echo "Error: Failed to unzip theme.zip."
exit 1
fi

# ZIPファイルの削除
# -o 実行結果をファイルへ出力
# -s ファイル出力時の進捗状況を非表示にする(エラーも非表示)
# curl -s $WP_THEME -o theme.zip
curl -sL https://downloads.wordpress.org/theme/lightning.zip -o theme.zip
# -d 指定したディレクトリに展開
unzip theme.zip -d tests/themes
# 展開したのでもとのzipファイルを削除 -f はエラーメッセージを表示しない
rm -f theme.zip

0 comments on commit 8479420

Please sign in to comment.