运行replace_hacs_download_mirror.sh后显示
replace_hacs_download_mirror.sh:lin 9: sudo:not found
replace_hacs_download_mirror.sh:lin 13: sudo:not found
这是replace_hacs_download_mirror.sh文件里的内容
# Run this file with sh command to auto REPLACE the github download website in HACS download.py file /config/custom_components/hacs/helpers/functions/download.py
# Script by chuixue
#! /bin/bash
# The following is the default download.py file path. Change it if yours is not the current path.
download_py_path="/usr/share/hassio/homeassistant/custom_components/hacs/helpers/functions/download.py"
# Delete the old lines if it is available
sudo sed -i '/url = url.replace("raw.githubusercontent.com", "raw.fastgit.org")/,/url = url.replace("\/\/github.com\/", "\/\/hub.fastgit.org\/")/d' $download_py_path
# Add the new lines
sudo sed -i '/if "tags\/" in url:/i\ url = url.replace("raw.githubusercontent.com", "raw.fastgit.org")\n if "releases/download/" in url or "archive/refs/" in url:\n url = url.replace("//github.com/", "//hub.fastgit.org/")' $download_py_path