Last active
September 20, 2024 21:41
-
-
Save bannzai/1c6be9dcfe7a827c1ef9b06ccaa833c0 to your computer and use it in GitHub Desktop.
Self._printChanges() を入れたり外したり
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
TARGET_DIR=$1 | |
SCRIPT_DIR="$(cd `dirname $0` && pwd -P)" | |
REPOSITORY_ROOT_DIR="$(cd $SCRIPT_DIR && cd .. && pwd -P)" | |
find "$REPOSITORY_ROOT_DIR/$TARGET_DIR" -name "*.swift" -exec sed -i '' '/var body: some View {/a\ | |
let _ = Self._printChanges() | |
' {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
SCRIPT_DIR="$(cd `dirname $0` && pwd -P)" | |
REPOSITORY_ROOT_DIR="$(cd $SCRIPT_DIR && cd .. && pwd -P)" | |
find "$REPOSITORY_ROOT_DIR" -name "*.swift" -exec sed -i '' '/let _ = Self._printChanges()/d' {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
リポジトリのルートディレクトリから一階層下(scripts)にこのスクリプトが保存されてて、リポジトリのルートディレクトリから実行する想定で書かれている。今のプロジェクトがこの構成だったからそのまま貼り付けた。実行方法は下