Skip to content

.sdirs symlinks #59

@choman

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

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