加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install.sh 652 Bytes
一键复制 编辑 原始数据 按行查看 历史
topsworld 提交于 2024-12-10 17:36 . feat: first commit
#!/bin/bash
set -e
# Check the number of input parameters.
if [ $# -ne 1 ]; then
echo "usage: $0 [config_path]"
exit 1
fi
# Get the config path.
config_path=$1
# Check if config path exists.
if [ ! -d "$config_path" ]; then
echo "$config_path does not exist"
exit 1
fi
# Remove the old version.
rm -rf "$config_path/custom_components/xiaomi_home"
# Get the script path.
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/"
# Done.
echo "Xiaomi Home installation is completed. Please restart Home Assistant."
exit 0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化