我有一个源代码控制系统在工作,我无法修改它在不幸的地方散布了一堆文件。我的 IDE 期望这些文件夹位于一个统一的位置。通常我只会对所有内容进行符号链接,但更糟糕的是,某些文件夹必须递归合并。我保证没有重叠的文件名,但我们谈论的是数千个文件,比我手工做的要多。
我已经研究过 unionfs 和 aufs,但它是一台公司机器,所以不用考虑内核(更不用说这些 wang chung 的“入门”文档了)。
有没有另一种方法可以做到这一点?
我有一个像下面这样的脚本:
flag=false
# Do a bunch of stuff that might set flag to true.
if [[ "$flag" == "true" ]]; then
command \
| pipe_command_a \
| pipe_command_b \
| pipe_command_c \
| pipe_command_d \
> "${output_path}"
else
command \
| pipe_command_a \
| pipe_command_c \
| pipe_command_d \
> "${output_path}"
fi
Run Code Online (Sandbox Code Playgroud)
唯一的区别flag
是true
或false
品牌是pipe_command_b
可能无法运行。有没有办法折叠它,这样我就不必重复所有常见的东西?