代码拉取完成,页面将自动刷新
#!/bin/bash
# Root gradle directory containing the original libs.versions.toml
root_gradle_dir="gradle"
root_libs_versions_file="${root_gradle_dir}/libs.versions.toml"
# Check if the root libs.versions.toml file exists
if [ ! -f "$root_libs_versions_file" ]; then
echo "Root libs.versions.toml file not found in ${root_gradle_dir}. Exiting."
exit 1
fi
# Find all subdirectories named "gradle"
find . -type d -name "gradle" | while read -r gradle_dir; do
# Skip the root gradle directory
if [ "$gradle_dir" != "./$root_gradle_dir" ]; then
# Target file in the subdirectory
target_file="${gradle_dir}/libs.versions.toml"
# Remove the target file if it already exists
if [ -f "$target_file" ] || [ -L "$target_file" ]; then
rm -f "$target_file"
fi
# Calculate the relative path from the subdirectory to the root libs.versions.toml
relative_path=$(realpath --relative-to="$gradle_dir" "$root_libs_versions_file")
# Create a symbolic link
ln -s "$relative_path" "$target_file"
echo "Created symlink: ${target_file} -> ${relative_path}"
fi
done
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。