aspiers / stow

GNU Stow - mirror of savannah git repository occasionally with more bleeding-edge branches
http://www.gnu.org/s/stow/
GNU General Public License v3.0
589 stars 41 forks source link

How to link files instead of directory #67

Closed peeweep closed 4 years ago

peeweep commented 4 years ago

stow is a great software, thank you for your continuous work. I encountered a problem while using it and hope to be helped.

mkdir -p project/.project/folder
touch  project/.project/folder/file

if ~/.project doesn't exist before run stow project, it will symbolic link directory ~/.project to project/.project , not file ~/.project/folder/file to project/.project/folder/file.

~/.project/folder/subfolder will be generated after run otehr software. The new folder will be copied from ~/.project/folder/subfolder to project/.project/folder/subfolder. But I want to ignore subfolder.

I tried writing \subfolder in project/.stow-local-ignore but it didn't work. Since ~/.project was added as a soft link first, ~/.project/folder/subfolder will still serve as a soft link to project/.project/folder/subfolder

My current solution is to build the directory mkdir -p ~/.project/folder before stow project

FichteFoll commented 4 years ago

Use --no-folding.

peeweep commented 4 years ago

It works! Sorry i didn't read the manpage carefully and thank you. Now i closed the issue

otakutyrant commented 1 year ago

Use --no-folding.

This is an ultimate argument that can save the world. SO USEFUL THAT I CAN' T HELP TO COMMENT! Haha.