Re: Ignore directories in stow
Rudra Banerjee <[email protected]> Thu, 30 Apr 2020 08:34:30 +0000
| Newsgroups | gmane.comp.gnu.stow.general |
|---|---|
| Message-ID | <AM5P190MB02762772FD9C986B86F0A2A3E9AA0@AM5P190MB0276.EURP190.PROD.OUTLOOK.COM> |
--_000_AM5P190MB02762772FD9C986B86F0A2A3E9AA0AM5P190MB0276EURP_
Content-Type: text/plain; charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
I have rerun stow with verbose=3D5, and here is the output:
Stowing contents of Utility/configs/vim (cwd=3D/home/rudra)
=3D> Utility/configs/vim
is_a_node(.)
link_task_action(.): no task
dir_task_action(.): no task
parent_link_scheduled_for_removal(.): prefix
parent_link_scheduled_for_removal(.): returning false
is_a_node(.): really exists
Using ignore file: Utility/configs/vim/.stow-local-ignore
Ignore list regexp for paths: /(?^:(^|/)(\.vim/spell|^/\.stow\-local=
\-ignore$|\.vim/plugged)(/|$))/
Ignore list regexp for segments: none
Not ignoring .vimrc
Stowing Utility/configs / vim / .vimrc
=3D> Utility/configs/vim/.vimrc
is_a_link(.vimrc)
link_task_action(.vimrc): no task
is_a_link(.vimrc): returning 0
is_a_node(.vimrc)
link_task_action(.vimrc): no task
dir_task_action(.vimrc): no task
parent_link_scheduled_for_removal(.vimrc): prefix .vimrc
parent_link_scheduled_for_removal(.vimrc): returning false
is_a_node(.vimrc): returning false
LINK: .vimrc =3D> Utility/configs/vim/.vimrc
Using ignore file: Utility/configs/vim/.stow-local-ignore
Using memoized regexps from Utility/configs/vim/.stow-local-ignore
Ignore list regexp for paths: /(?^:(^|/)(\.vim/spell|^/\.stow\-local=
\-ignore$|\.vim/plugged)(/|$))/
Ignore list regexp for segments: none
Ignoring path /.stow-local-ignore
Using ignore file: Utility/configs/vim/.stow-local-ignore
Using memoized regexps from Utility/configs/vim/.stow-local-ignore
Ignore list regexp for paths: /(?^:(^|/)(\.vim/spell|^/\.stow\-local=
\-ignore$|\.vim/plugged)(/|$))/
Ignore list regexp for segments: none
Not ignoring .vim
Stowing Utility/configs / vim / .vim
=3D> Utility/configs/vim/.vim
is_a_link(.vim)
link_task_action(.vim): no task
is_a_link(.vim): returning 0
is_a_node(.vim)
link_task_action(.vim): no task
dir_task_action(.vim): no task
parent_link_scheduled_for_removal(.vim): prefix .vim
parent_link_scheduled_for_removal(.vim): returning false
is_a_node(.vim): returning false
LINK: .vim =3D> Utility/configs/vim/.vim
Planning stow of package vim... d
Kindly help.
________________________________
From: Rudra Banerjee <[email protected]>
Sent: 30 April 2020 12:05
To: [email protected] <[email protected]>
Subject: Ignore directories in stow
Hi all,
I am relatively new in stow (using for last 6 months). While this is workin=
g fine for backing up my config files, it is actually storing unwanted file=
s, and not obeying my .stow-local-ignore.
I am using a script to install stow all my stowed files:
cat ~/bin/stow.sh
#!/usr/bin/env bash
# This script will Stow all the dotfiles located in the ~/dotfiles folder.
# The -R flag is used to force a 'restow' which will remove any existing sy=
mlinks before attempting to Stow.
echo "Stowing Dotfiles...";
cd ~/Utility/configs
for file in *; do
# Only run Stow on the directories in the dotfiles folder and not the ind=
ividual files.
# Using 'basename' strips the filepath from the directory name.
if [ -d ${file} ]; then
stow $(basename $file) -t ~/
echo "$(basename $file) stowed.";
fi
done
# Return back to the your PWD from before you ran the script
cd ~-
echo 'All stowed';
Now, among many stowed files, lets take the example of vim: The path is:
~/Utility/configs/vim which has the structure:
tree -a -L 2
.
=86=80=80 .stow-local-ignore
=86=80=80 .vim
=81 =86=80=80 autoload
=81 =86=80=80 plugged
=81 =86=80=80 spell
=81 =84=80=80 UltiSnips
=84=80=80 .vimrc
But, inside .vim, I don't want plugged and spells to be stowed, so, I have =
.stow-local-ignore:
cat .stow-local-ignore
\.vim/plugged
\.vim/spell
But this is not working. I have actually deleted those unwanted dir's and =
unlinked ~/.vim and restowed, but this does not work. As soon as those file=
s are generated inside ~/.vim, it is stowed.
How I ignore them?
Kindly help.
--_000_AM5P190MB02762772FD9C986B86F0A2A3E9AA0AM5P190MB0276EURP_
Content-Type: text/html; charset="koi8-r"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dkoi8-r">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
color: rgb(0, 0, 0);">
I have rerun stow with verbose=3D5, and here is the output:</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
color: rgb(0, 0, 0);">
<pre style=3D"margin: 0px 0px 1em; padding: 12px 8px; font-family: Consolas=
, Menlo, Monaco, "Lucida Console", "Liberation Mono", &=
quot;DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Co=
urier New", monospace, sans-serif; font-size: 13px; width: auto; max-h=
eight: 600px; overflow: auto; background-color: var(--black-050); border-ra=
dius: 3px; color: rgb(36, 39, 41); text-align: left"><code style=3D"margin:=
0px">Stowing contents of Utility/configs/vim (cwd=3D/home/rudra)=0A=
=3D> Utility/configs/vim=0A=
is_a_node(.)=0A=
link_task_action(.): no task=0A=
dir_task_action(.): no task=0A=
parent_link_scheduled_for_removal(.): prefix =0A=
parent_link_scheduled_for_removal(.): returning false=0A=
is_a_node(.): really exists=0A=
Using ignore file: Utility/configs/vim/.stow-local-ignore=0A=
Ignore list regexp for paths: /(?^:(^|/)(\.vim/spell|^/\.stow\-local=
\-ignore$|\.vim/plugged)(/|$))/=0A=
Ignore list regexp for segments: none=0A=
Not ignoring .vimrc=0A=
Stowing Utility/configs / vim / .vimrc=0A=
=3D> Utility/configs/vim/.vimrc=0A=
is_a_link(.vimrc)=0A=
link_task_action(.vimrc): no task=0A=
is_a_link(.vimrc): returning 0=0A=
is_a_node(.vimrc)=0A=
link_task_action(.vimrc): no task=0A=
dir_task_action(.vimrc): no task=0A=
parent_link_scheduled_for_removal(.vimrc): prefix .vimrc=0A=
parent_link_scheduled_for_removal(.vimrc): returning false=0A=
is_a_node(.vimrc): returning false=0A=
LINK: .vimrc =3D> Utility/configs/vim/.vimrc=0A=
Using ignore file: Utility/configs/vim/.stow-local-ignore=0A=
Using memoized regexps from Utility/configs/vim/.stow-local-ignore=0A=
Ignore list regexp for paths: /(?^:(^|/)(\.vim/spell|^/\.stow\-local=
\-ignore$|\.vim/plugged)(/|$))/=0A=
Ignore list regexp for segments: none=0A=
Ignoring path /.stow-local-ignore=0A=
Using ignore file: Utility/configs/vim/.stow-local-ignore=0A=
Using memoized regexps from Utility/configs/vim/.stow-local-ignore=0A=
Ignore list regexp for paths: /(?^:(^|/)(\.vim/spell|^/\.stow\-local=
\-ignore$|\.vim/plugged)(/|$))/=0A=
Ignore list regexp for segments: none=0A=
Not ignoring .vim=0A=
Stowing Utility/configs / vim / .vim=0A=
=3D> Utility/configs/vim/.vim=0A=
is_a_link(.vim)=0A=
link_task_action(.vim): no task=0A=
is_a_link(.vim): returning 0=0A=
is_a_node(.vim)=0A=
link_task_action(.vim): no task=0A=
dir_task_action(.vim): no task=0A=
parent_link_scheduled_for_removal(.vim): prefix .vim=0A=
parent_link_scheduled_for_removal(.vim): returning false=0A=
is_a_node(.vim): returning false=0A=
LINK: .vim =3D> Utility/configs/vim/.vim=0A=
Planning stow of package vim... d</code></pre>
<br>
</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
color: rgb(0, 0, 0);">
Kindly help.</div>
<div id=3D"appendonsend"></div>
<hr style=3D"display:inline-block;width:98%" tabindex=3D"-1">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st=
yle=3D"font-size:11pt" color=3D"#000000"><b>From:</b> Rudra Banerjee <bn=
[email protected]><br>
<b>Sent:</b> 30 April 2020 12:05<br>
<b>To:</b> [email protected] <[email protected]><br>
<b>Subject:</b> Ignore directories in stow</font>
<div> </div>
</div>
<style type=3D"text/css" style=3D"display:none">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir=3D"ltr">
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
Hi all,</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
I am relatively new in stow (using for last 6 months). While this is workin=
g fine for backing up my config files, it is actually storing unwanted file=
s, and not obeying my .stow-local-ignore.</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
<br>
</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
I am using a script to install stow all my stowed files:</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
<span><i>cat ~/bin/stow.sh <br>
</i></span>
<div><i>#!/usr/bin/env bash<br>
</i></div>
<div><i><br>
</i></div>
<div><i># This script will Stow all the dotfiles located in the ~/dotfiles =
folder.<br>
</i></div>
<div><i># The -R flag is used to force a 'restow' which will remove any exi=
sting symlinks before attempting to Stow.<br>
</i></div>
<div><i><br>
</i></div>
<div><i>echo "Stowing Dotfiles...";<br>
</i></div>
<div><i><br>
</i></div>
<div><i>cd ~/Utility/configs<br>
</i></div>
<div><i>for file in *; do<br>
</i></div>
<div><i> # Only run Stow on the directories in the dotfiles folder an=
d not the individual files.<br>
</i></div>
<div><i> # Using 'basename' strips the filepath from the directory na=
me. <br>
</i></div>
<div><i> if [ -d ${file} ]; then<br>
</i></div>
<div><i> stow $(basename $file) -t ~/<br>
</i></div>
<div><i> echo "$(basename $file) stowed."; <br>
</i></div>
<div><i> fi<br>
</i></div>
<div><i>done<br>
</i></div>
<div><i><br>
</i></div>
<div><i># Return back to the your PWD from before you ran the script<br>
</i></div>
<div><i>cd ~- <br>
</i></div>
<div><i><br>
</i></div>
<div><i>echo 'All stowed';</i><br>
</div>
<span></span><br>
</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
<br>
</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
Now, among many stowed files, lets take the example of vim: The path is:</d=
iv>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
~/Utility/configs/vim which has the structure:<br>
</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
<span>tree -a -L 2<br>
</span>
<div>.<br>
</div>
<div>=86=80=80 .stow-local-ignore<br>
</div>
<div>=86=80=80 .vim<br>
</div>
<div>=81 =86=80=80 autoload<br>
</div>
<div>=81 =86=80=80 plugged<br>
</div>
<div>=81 =86=80=80 spell<br>
</div>
<div>=81 =84=80=80 UltiSnips<br>
</div>
<div>=84=80=80 .vimrc<br>
</div>
<span></span><br>
</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
<br>
</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
But, inside .vim, I don't want plugged and spells to be stowed, so, I have =
.stow-local-ignore:</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
<span> cat .stow-local-ignore <br>
</span>
<div>\.vim/plugged<br>
</div>
<div>\.vim/spell<br>
</div>
<span></span><br>
</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
<br>
</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
But this is not working. I have actually deleted those unwanted dir's=
and unlinked ~/.vim and restowed, but this does not work. As soon as those=
files are generated inside ~/.vim, it is stowed. </div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
<br>
</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
How I ignore them?</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
<br>
</div>
<div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
or:rgb(0,0,0)">
Kindly help.</div>
</div>
</body>
</html>
--_000_AM5P190MB02762772FD9C986B86F0A2A3E9AA0AM5P190MB0276EURP_--