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

.sdirs symlinks #59

Open
choman opened this issue Mar 23, 2017 · 0 comments
Open

.sdirs symlinks #59

choman opened this issue Mar 23, 2017 · 0 comments

Comments

@choman
Copy link

choman commented Mar 23, 2017

I use yadm to manage my dotfiles across many different systems. The current
mechanism they have for managing files that are different are symlinks, so for
example

.sdirs## <- default
.sdirs##classA <- special one-off system (i.e. different and/or extra bashmarks)

A yadm alt command will link .sdirs --> .sdirs##classA or .sdirs --> .sdirs## based on
configuration.

The current bashmarks will stop on the symlink during a "s" and my guess "d"

Possible solution, to see if SDIRS is a link, if so follow it to the real file
change:

if [ ! -n "$SDIRS" ]; then
    SDIRS=~/.sdirs
fi
touch $SDIRS

to

if [ ! -n "$SDIRS" ]; then
    SDIRS=~/.sdirs
fi

tmp=$(readlink $SDIRS)
if [ -n "$tmp" ]; then
#    echo "Updating sdirs: $tmp"
    SDIRS=$tmp
fi
touch $SDIRS
@choman choman changed the title .sdir sym links .sdirs symlinks Mar 23, 2017
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