rcm icon indicating copy to clipboard operation
rcm copied to clipboard

mkrc doesn't respect undotted

Open xaltsc opened this issue 5 years ago • 5 comments

In my .rcrc, I have UNDOTTED="folder*". When doing mkrc ~/folder/subfolder/file, it reinstalls the file in .folder/subfolder/file.

xaltsc avatar Mar 18 '19 19:03 xaltsc

Fixed by #257, merged but not released.

mat-m avatar May 03 '20 22:05 mat-m

Since it's been fixed apparently, is it included in the 1.3.4 release ?

xaltsc avatar Sep 14 '21 20:09 xaltsc

Fixed in 1.3.5

mat-m avatar Apr 30 '22 23:04 mat-m

Fixed in 1.3.5

Respectfully, no. (Unless I'm doing something wrong.)

I cloned this repo last night and configured and make-installed the latest.

$ head -1 /usr/local/share/rcm/rcm.sh
VERSION="1.3.6"

Then, I repeated a test like the OP's and it failed.

$ # Like the OP, I have UNDOTTED.
$ cat ~/.rcrc
UNDOTTED="bin"

$ # Created a fresh .dotfiles directory.
$ [ -r ~/.dotfiles ] && echo "Yup" || echo "Nope"
Nope
$ mkdir ~/.dotfiles
$ [ -r ~/.dotfiles ] && echo "Yup" || echo "Nope"
Yup

$ # This is the file I want to mkrc.
$ ls -l ~/bin
total 4
-rwxr-xr-x 1 rick rick 32 Jun 13 13:39 foo.sh

$ # Checking for the existence of the spurious ~/.bin directory.
$ [ -r ~/.bin ] && echo "Yup" || echo "Nope"
Nope

$ # Let's do it!
$ mkrc ~/bin/foo.sh

$ # Should see the original now linked, right?  Nope, it's gone.
$ ls -l ~/bin
total 0

$ # Well, what about the spurious directory?  Doh!
$ [ -r ~/.bin ] && echo "Yup" || echo "Nope"
Yup
$ ls -l ~/.bin
total 0
lrwxrwxrwx 1 rick rick 31 Jun 13 13:52 foo.sh -> /home/rick/.dotfiles/bin/foo.sh

$ # The good news is that we haven't lost it.
$ ls -l ~/.dotfiles/bin
total 4
-rwxr-xr-x 1 rick rick 32 Jun 13 13:39 foo.sh

I'm currently using this post-processing work-around for now.

mv ~/.bin/* ~/bin

cryptorick avatar Jun 13 '23 18:06 cryptorick

Addendum

In the meantime, lsrc has the correct reporting. :+1:

 $ lsrc
/home/rick/bin/foo.sh:/home/rick/.dotfiles/bin/foo.sh

cryptorick avatar Jun 13 '23 18:06 cryptorick