Skip to content

Commit

Permalink
fix: directory copy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
yejinze committed Dec 18, 2024
1 parent d437963 commit 6fae26a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ rm -rf "$config_path/custom_components/xiaomi_home"
script_path=$(dirname "$0")
# Change to the script path.
cd "$script_path"

# Copy the new version.
cp -r custom_components/xiaomi_home/ "$config_path/custom_components/"
if [ -d "$config_path/custom_components" ]; then
cp -r custom_components/xiaomi_home/ "$config_path/custom_components/"
else
cp -r custom_components/ "$config_path/custom_components/"
fi

# Done.
echo "Xiaomi Home installation is completed. Please restart Home Assistant."
Expand Down

0 comments on commit 6fae26a

Please sign in to comment.