1 Star 1 Fork 0

周魏/spring-security-samples

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
sync-libs-symlinks.sh 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
Josh Cummings 提交于 2024-08-01 07:35 +08:00 . Make Projects Individually Runnable
#!/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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zwhx/spring-security-samples.git
git@gitee.com:zwhx/spring-security-samples.git
zwhx
spring-security-samples
spring-security-samples
main

搜索帮助

371d5123 14472233 46e8bd33 14472233