support directory pre-creation

This commit is contained in:
Diego Fernando Carrión 2024-09-29 17:12:14 +00:00 committed by Diego Ferando Carrión
parent 6be4b3af24
commit beba66ee8c
Signed by: CRThaze
GPG Key ID: 8279B79A1A7F8194
44 changed files with 36 additions and 17 deletions

1
etc/any/bash.dirs Normal file
View File

@ -0,0 +1 @@
bashrc.d

1
etc/linux-gnu/bash.dirs Normal file
View File

@ -0,0 +1 @@
profile.d

View File

@ -0,0 +1 @@
systemd/system/getty.target.wants

1
home/any/gpg.dirs Normal file
View File

@ -0,0 +1 @@
.gnupg

1
home/any/kitty.dirs Normal file
View File

@ -0,0 +1 @@
.config/kitty

1
home/any/scripts.dirs Normal file
View File

@ -0,0 +1 @@
.local/bin

1
home/any/ssh.dirs Normal file
View File

@ -0,0 +1 @@
.ssh

1
home/any/tmux.dirs Normal file
View File

@ -0,0 +1 @@
.tmux

6
home/any/vim.dirs Normal file
View File

@ -0,0 +1,6 @@
.config/nvim/autoload
.config/nvim/colors
.config/nvim/plugged
.config/nvim/session
.config/nvim/spell
.config/nvim/tmp

View File

@ -1 +0,0 @@
../.vim

1
home/any/vim/.vim Symbolic link
View File

@ -0,0 +1 @@
.config/nvim

View File

@ -1,2 +0,0 @@
plugged/*
!plugged/.gitkeep

View File

@ -1,6 +0,0 @@
backup/*
!backup/.gitkeep
swap/*
!swap/.gitkeep
undo/*
!undo/.gitkeep

View File

@ -0,0 +1 @@
.config/karabiner

View File

@ -0,0 +1 @@
.confg/dunst

View File

@ -0,0 +1,2 @@
.local/share/fonts/Misc
.local/share/fonts/NerdFonts

View File

@ -1 +0,0 @@
6b030113-c86d-47e3-a99e-db6536d5d1e0

View File

@ -1 +0,0 @@
4e8c22c3-bce7-43f0-92f0-d9ff358052b4

View File

@ -0,0 +1 @@
.local/share/gnome-shell/extensions

2
home/linux-gnu/i3.dirs Normal file
View File

@ -0,0 +1,2 @@
.config/i3
.config/i3status

View File

@ -0,0 +1 @@
.config/systemd/user/default.target.wants

View File

@ -0,0 +1 @@
.wordgrinder

View File

@ -1,22 +1,28 @@
#!/usr/bin/env bash #!/usr/bin/env bash
mkdir -p $HOME/.ssh > /dev/null 2>&1
mkdir -p $HOME/.gnupg > /dev/null 2>&1
chmod 700 $HOME/.gnupg
mkdir -p $HOME/.local/bin
#set -x
shopt -s extglob shopt -s extglob
for x in home/{any,"${OSTYPE%%+([[:digit:].])}"}/* for x in home/{any,"${OSTYPE%%+([[:digit:].])}"}/*
do do
if [[ -f ${x}.dirs ]]
then
cat ${x}.dirs | xargs -I {} mkdir -p $HOME/{}
fi
if [[ -d $x ]] if [[ -d $x ]]
then then
stow -t $HOME -d $(dirname $x) $(basename $x) stow -t $HOME -d $(dirname $x) $(basename $x)
fi fi
done done
chmod 700 $HOME/.gnupg
sudo chown root:root -R etc/*/*/
for x in etc/{any,"${OSTYPE%%+([[:digit:].])}"}/* for x in etc/{any,"${OSTYPE%%+([[:digit:].])}"}/*
do do
if [[ -f ${x}.dirs ]]
then
cat ${x}.dirs | xargs -I {} sudo mkdir -p /etc/{}
fi
if [[ -d $x ]] if [[ -d $x ]]
then then
sudo stow -t /etc -d $(dirname $x) $(basename $x) sudo stow -t /etc -d $(dirname $x) $(basename $x)