Skip to content

.sdirs symlinks #59

Description

@choman

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 stomp 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions