Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with symlinks #910

Open
pitosalas opened this issue Aug 17, 2018 · 0 comments
Open

Issue with symlinks #910

pitosalas opened this issue Aug 17, 2018 · 0 comments

Comments

@pitosalas
Copy link

I am not the first to report that this is tripping me up and so I don't think there's a solution other than changing my directory structure which for various reasons I am limited from doing. But here's the situation:

prog/
  dir1/
    dir11/
       file111
       file113
    dir12/
       ...
     dir13/
        ...
     symlink1 -> libdir2
     symlink2 -> lib
  file1
  file2

lib/
  libdir1/
    filelib1
  libdir2/
    filelib2

Ok so I want to execute a shell command (the same one) when any of these files change:

  1. Any file in dir1 (and I don't want to enumerate each of the dir1x's because there are a lot and they change)
  2. Any file in lib (and again I don't want to enumerate the libdirx's because there are a lot and they change.
  3. prog/file1

Since symlink1 is a directory contained in symlink2 I get the famous error

Here's the Guardfile:

guard :shell do
  clearing :on
  directories %w( . /mydev/cg-topics                  )
  watch(%r{(Rules)|(.erb)|(.rb)|(.css)}) { `cg compile` }
end

And here's the actual directory structure (which is more complicated)

.
├── Guardfile
├── Rules
├── cg_config.rb
├── content
│   ├── bootstrap
│   │   ├── css
│   │   ├── fonts
│   │   ├── images
│   │   └── js
│   └── content
│       ├── background
│       ├── book -> /mydev/cg-topics/robotrosbook/
│       ├── extras
│       ├── images
│       ├── intro
│       ├── projects
│       ├── s2018fall
│       ├── tipuesearch
│       └── topics -> /mydev/cg-topics/
├── crash.log
├── layouts
│   ├── banner.html.erb
│   ├── body_footer.html
│   ├── body_header.html.erb
│   ├── bottom_includes.html.erb
│   ├── course.html.erb
│   ├── helpful_box.html
│   ├── main_navbar.html.erb
│   ├── main_navbarorg.html.erb
│   ├── nav-menus.html.erb
│   ├── nav-menusorg.html.erb
│   ├── sidebar.html.erb
│   └── top_includes.html.erb
├── lib
│   └── default.rb
├── nanoc.yaml
├── notes.md.erb
├── notes2017fall.txt
├── output
│   ├── bootstrap
│   │   ├── css
│   │   ├── fonts
│   │   ├── images
│   │   └── js
│   ├── content
│   │   ├── background
│   │   ├── book
│   │   ├── extras
│   │   ├── images
│   │   ├── intro
│   │   ├── projects
│   │   ├── s2018fall
│   │   ├── tipuesearch
│   │   └── topics
│   ├── index.html
│   └── tipuesearch
│       └── tipuesearch_content.js
└── tmp
    └── nanoc
        └── 1029d67644815
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant