support directory pre-creation
This commit is contained in:
parent
6be4b3af24
commit
beba66ee8c
1
etc/any/bash.dirs
Normal file
1
etc/any/bash.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
bashrc.d
|
1
etc/linux-gnu/bash.dirs
Normal file
1
etc/linux-gnu/bash.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
profile.d
|
1
etc/linux-gnu/systemd.dirs
Normal file
1
etc/linux-gnu/systemd.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
systemd/system/getty.target.wants
|
1
home/any/gpg.dirs
Normal file
1
home/any/gpg.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
.gnupg
|
1
home/any/kitty.dirs
Normal file
1
home/any/kitty.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
.config/kitty
|
1
home/any/scripts.dirs
Normal file
1
home/any/scripts.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
.local/bin
|
1
home/any/ssh.dirs
Normal file
1
home/any/ssh.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
.ssh
|
1
home/any/tmux.dirs
Normal file
1
home/any/tmux.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
.tmux
|
6
home/any/vim.dirs
Normal file
6
home/any/vim.dirs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
.config/nvim/autoload
|
||||||
|
.config/nvim/colors
|
||||||
|
.config/nvim/plugged
|
||||||
|
.config/nvim/session
|
||||||
|
.config/nvim/spell
|
||||||
|
.config/nvim/tmp
|
@ -1 +0,0 @@
|
|||||||
../.vim
|
|
1
home/any/vim/.vim
Symbolic link
1
home/any/vim/.vim
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
.config/nvim
|
2
home/any/vim/.vim/.gitignore
vendored
2
home/any/vim/.vim/.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
plugged/*
|
|
||||||
!plugged/.gitkeep
|
|
6
home/any/vim/.vim/tmp/.gitignore
vendored
6
home/any/vim/.vim/tmp/.gitignore
vendored
@ -1,6 +0,0 @@
|
|||||||
backup/*
|
|
||||||
!backup/.gitkeep
|
|
||||||
swap/*
|
|
||||||
!swap/.gitkeep
|
|
||||||
undo/*
|
|
||||||
!undo/.gitkeep
|
|
1
home/darwin/karabiner.dirs
Normal file
1
home/darwin/karabiner.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
.config/karabiner
|
1
home/linux-gnu/dunst.dirs
Normal file
1
home/linux-gnu/dunst.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
.confg/dunst
|
2
home/linux-gnu/fonts.dirs
Normal file
2
home/linux-gnu/fonts.dirs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.local/share/fonts/Misc
|
||||||
|
.local/share/fonts/NerdFonts
|
@ -1 +0,0 @@
|
|||||||
6b030113-c86d-47e3-a99e-db6536d5d1e0
|
|
@ -1 +0,0 @@
|
|||||||
4e8c22c3-bce7-43f0-92f0-d9ff358052b4
|
|
1
home/linux-gnu/gnome-extensions.dirs
Normal file
1
home/linux-gnu/gnome-extensions.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
.local/share/gnome-shell/extensions
|
2
home/linux-gnu/i3.dirs
Normal file
2
home/linux-gnu/i3.dirs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.config/i3
|
||||||
|
.config/i3status
|
1
home/linux-gnu/systemd.dirs
Normal file
1
home/linux-gnu/systemd.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
.config/systemd/user/default.target.wants
|
1
home/linux-gnu/wordgrinder.dirs
Normal file
1
home/linux-gnu/wordgrinder.dirs
Normal file
@ -0,0 +1 @@
|
|||||||
|
.wordgrinder
|
18
stowall.sh
18
stowall.sh
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user