Skip to content

Commit

Permalink
Merge pull request #224 from arkedge/feature/feedback-from-v4-migration
Browse files Browse the repository at this point in the history
Feedback from v4.0.0 migration
  • Loading branch information
sksat authored Nov 29, 2023
2 parents 3557828 + ba22ce2 commit 5ef1a70
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ Rust エコシステム / C2A Boom の導入については,ArkEdge Space Inc.
- [#138](https://github.com/arkedge/c2a-core/pull/138): C2A user の pytest のディレクトリ構成のリファクタ: [v4-rename-test-dir.sh](./script/migration/v4-rename-test-dir.sh) を実行
- [#154](https://github.com/arkedge/c2a-core/pull/154), [#155](https://github.com/arkedge/c2a-core/pull/155): [v4-rename-component-driver-prefix.sh](./script/migration/v4-rename-component-driver-prefix.sh) を実行
- [#165](https://github.com/arkedge/c2a-core/pull/165), [#166](https://github.com/arkedge/c2a-core/pull/166), [#169](https://github.com/arkedge/c2a-core/pull/169): [v4-rename-if-list.sh](./script/migration/v4-rename-if-list.sh)
- v4.0.0
- [#167](https://github.com/arkedge/c2a-core/pull/167), [#168](https://github.com/arkedge/c2a-core/pull/168): `src/src_user/Settings` -> `src/src_user/settings`
- [v4.0.0](https://github.com/arkedge/c2a-core/releases/tag/v4.0.0)
- [#167](https://github.com/arkedge/c2a-core/pull/167), [#168](https://github.com/arkedge/c2a-core/pull/168): `src/src_user/Settings` -> `src/src_user/settings`: [v4-rename-settings.sh](./script/migration/v4-rename-settings.sh) を実行
- [#172](https://github.com/arkedge/c2a-core/pull/172): `src/src_user/settings/tlm_cmd/data_base` -> `tlm-cmd-db` の rename を実行([v4-move-db-dir.sh](script/migration/v4-move-db-dir.sh)


Expand Down
11 changes: 11 additions & 0 deletions script/migration/v4-rename-settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ for ((i=0; i<${#tl_org[@]}; i++)); do
sed -i -e "s#modes/task_lists/${tl_org[i]}#modes/task_lists/${tl_new[i]}#g" src/src_user/settings/CMakeLists.txt

find_all | xargs -0 sed -i -e "s#Settings/Modes/TaskLists/${tl_org[i]}#settings/modes/task_lists/${tl_new[i]}#g"
find_all | xargs -0 sed -i -e "s#Settings\\\Modes\\\TaskLists\\\\${tl_org[i]}#settings\\\modes\\\task_lists\\\\${tl_new[i]}#g"

if [ -e src/src_user/settings/modes/task_lists/${tl_org[i]} ]; then
mv src/src_user/settings/modes/task_lists/${tl_org[i]} src/src_user/settings/modes/task_lists/${tl_new[i]}
fi

done
find_all | xargs -0 sed -i -e "s#Settings/Modes/TaskLists#settings/modes/task_lists#g"
find_all | xargs -0 sed -i -e "s#Settings\\\Modes\\\TaskLists#settings\\\modes\\\task_lists#g"


echo " /modes/Transitions -> transitions"
Expand All @@ -45,18 +47,27 @@ mv src/src_user/settings/modes/Transitions src/src_user/settings/modes/transitio
for ((i=0; i<${#tr_org[@]}; i++)); do
echo " /transitions/${tr_org[i]} -> ${tr_new[i]}"

sed -i -e "s#modes/transitions/${tr_org[i]}#modes/transitions/${tr_new[i]}#g" src/src_user/settings/CMakeLists.txt

find_all | xargs -0 sed -i -e "s#Settings/Modes/Transitions/${tr_org[i]}#settings/modes/transitions/${tr_new[i]}#g"
find_all | xargs -0 sed -i -e "s#Settings\\\Modes\\\Transitions\\\\${tr_org[i]}#settings\\\modes\\\transitions\\\\${tr_new[i]}#g"

if [ -e src/src_user/settings/modes/transitions/${tr_org[i]} ]; then
mv src/src_user/settings/modes/transitions/${tr_org[i]} src/src_user/settings/modes/transitions/${tr_new[i]}
fi
done
find_all | xargs -0 sed -i -e "s#Settings/Modes/Transitions#settings/modes/transitions#g"
find_all | xargs -0 sed -i -e "s#Settings\\\Modes\\\Transitions#settings\\\modes\\\transitions#g"

# ref
find_all | xargs -0 sed -i -e "s#Settings/Modes#settings/modes#g"
find_all | xargs -0 sed -i -e "s#Settings\\\Modes#settings\\\modes#g"

find_all | xargs -0 sed -i -e "s#Settings/AnomalyHandlerRules#settings/anomaly_handler_rules#g"
find_all | xargs -0 sed -i -e "s#Settings\\\AnomalyHandlerRules#settings\\\anomaly_handler_rules#g"

find_all | xargs -0 sed -i -e "s#Settings/AnomalyLogger#settings/anomaly_logger#g"
find_all | xargs -0 sed -i -e "s#Settings\\\AnomalyLogger#settings\\\anomaly_logger#g"

find_all | xargs -0 sed -i -e "s#Settings/ComponentDriverSuper#settings/component_driver_super#g"
find_all | xargs -0 sed -i -e "s#Settings\\\ComponentDriverSuper#settings\\\component_driver_super#g"
Expand Down

0 comments on commit 5ef1a70

Please sign in to comment.