Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for src in $(find -H "$DOTFILES_ROOT" -maxdepth 2 -name '*.sym' -not -path '*.git*')
- do
- dst="$HOME/$(basename "${src%.*}")"
- link_file "$src" "$dst"
- done
- For loops over find output are fragile. Use find -exec or a while read loop.
- find -H "$(pwd)" -maxdepth 2 -name '*.sym' -not -path '*.git*' -exec echo {} ;
- find -H "$DOTFILES_ROOT" -maxdepth 2 -type d -name '.git' -prune -o
- -type f -name '*.sym' -exec sh -c '
- link_file "$1" "$HOME/$( basename "${1%.*}" )"' sh {} ';'
- find -H "$DOTFILES_ROOT" -maxdepth 2 -type d -name '.git' -prune -o
- -type f -name '*.sym' -exec sh -c '
- for src do
- dst="$HOME/$( basename "${src%.*}" )"
- link_file "$src" "$dst"
- done' sh {} +
Add Comment
Please, Sign In to add comment