Skip to content

Commit

Permalink
feat: automatically correct file formats
Browse files Browse the repository at this point in the history
  • Loading branch information
DDSRem committed Mar 2, 2024
1 parent 1657cc9 commit 4679132
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions emby_config_editor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ if [ ! -d "${config_dir}" ]; then
mkdir -p "${config_dir}"
fi

find "${config_dir}" -type f -name "*.txt" -exec sed -i "s/\r$//g" {} \;

if [ ! -s "${config_dir}/emby_config.txt" ]; then
{
echo "dev_dri=no"
Expand Down
2 changes: 2 additions & 0 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,8 @@ function get_config_dir() {
touch ${DDSREM_CONFIG_DIR}/xiaoya_alist_config_dir.txt
echo "${CONFIG_DIR}" > ${DDSREM_CONFIG_DIR}/xiaoya_alist_config_dir.txt
fi
# 将所有小雅配置文件修正成 linux 格式
find ${CONFIG_DIR} -type f -name "*.txt" -exec sed -i "s/\r$//g" {} \;

}

Expand Down

0 comments on commit 4679132

Please sign in to comment.