File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 ],
1616 // List of extensions recommended by VS Code that should not be recommended for users of this workspace.
1717 "unwantedRecommendations" : [
18-
18+ " GitHub.codespaces" ,
19+ " GitHub.copilot" ,
20+ " GitHub.copilot-chat" ,
21+ " foxundermoon.shell-format"
1922 ]
2023}
Original file line number Diff line number Diff line change @@ -11,5 +11,5 @@ services:
1111 environment :
1212 - DEBUG_MODE=false
1313 volumes :
14- - <TODO:pass>/logs /<TODO:application_code>:/<TODO:application_code>/data/log
14+ - <TODO:log_dir> /<TODO:application_code>:/<TODO:application_code>/data/log
1515
Original file line number Diff line number Diff line change 99- [ ] 開発環境を初期整備する
1010
11111 . Codespaceに接続する
12- 2 . init_repo.shを編集する
12+ 2 . init_repo.shを編集し、シェルスクリプトを実行する
1313```
1414replacement_map["<TODO:application_name>"]="sample-downloader"
1515replacement_map["<TODO:project_path>"]="d"
16- replacement_map["<TODO:container_pass>"]="xxx"
17- replacement_map["<TODO:application_code>"]="/xxx"
18- replacement_map["<TODO:pass>"]="/d/Dropbox/"
16+ replacement_map["<TODO:application_code>"]="xxx"
17+ replacement_map["<TODO:log_dir>"]="/d/Dropbox/logs"
1918```
20193 . dockerコンテナを一通り動かしてみる
21204 . 動かして問題が無かったら、init_repo.shを手動削除する
Original file line number Diff line number Diff line change @@ -12,19 +12,19 @@ current_directory=$(pwd)
1212declare -A replacement_map
1313replacement_map[" <TODO:application_name>" ]=" sample-downloader"
1414replacement_map[" <TODO:project_path>" ]=" d"
15- replacement_map[" <TODO:container_pass>" ]=" xxx"
16- replacement_map[" <TODO:application_code>" ]=" /xxx"
17- replacement_map[" <TODO:pass>" ]=" /d/Dropbox/"
15+ replacement_map[" <TODO:application_code>" ]=" xxx"
16+ replacement_map[" <TODO:log_dir>" ]=" /d/Dropbox/logs"
1817
1918# カレントディレクトリ内の .ipynb および .md 以外のファイルを取得し、置換を行う
20- find " $current_directory " -type f ! \( -name " *.ipynb" -o -name " *.md" \) | while read -r filepath; do
19+ find " $current_directory " -type f ! \( -name " *.ipynb" -o -name " *.md" -o -name " init_repo.sh " \) | while read -r filepath; do
2120
2221 for target in " ${! replacement_map[@]} " ; do
2322 replacement=" ${replacement_map[$target]} "
2423
2524 # grepでtargetを含むファイルだけにsed操作を適用
2625 if grep -q " $target " " $filepath " ; then
27- sed -i " s/$target /$replacement /g" " $filepath "
26+ # sed の区切り文字を | に変更
27+ sed -i " s|$target |$replacement |g" " $filepath "
2828 fi
2929 done
3030
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- python < TODO:container_pass > app/main.py
3+ python / < TODO:application_code > / app/main.py
You can’t perform that action at this time.
0 commit comments