Skip to content

Commit

Permalink
設定スクリプトのコメントを日本語から英語に変更
Browse files Browse the repository at this point in the history
  • Loading branch information
KuraZuzu committed Jan 16, 2025
1 parent 17aa491 commit 4719318
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions firmware/setting_scripts/set_xs-dev_env.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/sh

# 追記するコマンドを設定
# Define the command to append
XS_DEV_SH="source ~/.local/share/xs-dev-export.sh"

# 現在のシェルを取得
# Get the current shell
CURRENT_SHELL=$(basename "$SHELL")

# 設定ファイルを決定
# Determine the configuration file
if [ "$CURRENT_SHELL" = "bash" ]; then
CONFIG_FILE="$HOME/.bashrc"
elif [ "$CURRENT_SHELL" = "zsh" ]; then
Expand All @@ -16,17 +16,17 @@ else
exit 1
fi

# 設定ファイルが存在しない場合は作成
# Create the configuration file if it doesn't exist
if [ ! -f "$CONFIG_FILE" ]; then
touch "$CONFIG_FILE"
echo "# Created $CONFIG_FILE for $CURRENT_SHELL settings" >> "$CONFIG_FILE"
echo "$CONFIG_FILE was created."
fi

# ファイルに追記
# Append the command to the file
if grep -Fxq "$XS_DEV_SH" "$CONFIG_FILE"; then
echo "The string '$XS_DEV_SH' already exists in $CONFIG_FILE. No changes made."
else
echo "$XS_DEV_SH" >> "$CONFIG_FILE"
echo "The string '$XS_DEV_SH' has been added to $CONFIG_FILE."
fi
fi
10 changes: 5 additions & 5 deletions firmware/setting_scripts/unset_psram.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/bin/sh

# 設定ファイルパスを取得
# Get the path to the configuration file
SDKCONFIG="$HOME/.local/share/moddable/build/devices/esp32/targets/m5stack_cores3/sdkconfig/sdkconfig.defaults"

# macOS Linux sed コマンドの互換性を考慮
# Ensure compatibility between macOS and Linux sed command
if [ "$(uname)" = "Darwin" ]; then
# macOS
# macOS
sed -i '' 's/CONFIG_SPIRAM=y/CONFIG_SPIRAM=n/' "$SDKCONFIG"
else
# Linux
# Linux
sed -i 's/CONFIG_SPIRAM=y/CONFIG_SPIRAM=n/' "$SDKCONFIG"
fi

# 結果を表示
# Display the result
cat "$SDKCONFIG"

0 comments on commit 4719318

Please sign in to comment.