Change dotfiles to work with stow
apt install stow then run ./stow_script.sh from the directorymaster
parent
f6e57b0f15
commit
10742107d0
@ -0,0 +1,39 @@
|
||||
Host truenas
|
||||
Hostname 192.168.0.100
|
||||
User nathan
|
||||
Port 2020
|
||||
|
||||
Host red
|
||||
Hostname 192.168.0.200
|
||||
User nathan
|
||||
Port 2020
|
||||
|
||||
Host lilman
|
||||
Hostname 192.168.0.220
|
||||
User nathan
|
||||
Port 2020
|
||||
|
||||
Host opnsense
|
||||
Hostname 192.168.0.221
|
||||
User nathan
|
||||
Port 2020
|
||||
|
||||
Host truenas
|
||||
Hostname 192.168.0.222
|
||||
User nathan
|
||||
Port 2020
|
||||
|
||||
Host wireguard
|
||||
Hostname 192.168.0.223
|
||||
User nathan
|
||||
Port 2020
|
||||
|
||||
Host racknerd
|
||||
Hostname racknerd.aney.co.uk
|
||||
User nathan
|
||||
Port 2020
|
||||
|
||||
Host alphavps
|
||||
Hostname alphavps.aney.co.uk
|
||||
User nathan
|
||||
Port 2020
|
||||
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIRS=$(ls -d */)
|
||||
#stow -d
|
||||
|
||||
# First make hidden files not wildcardable
|
||||
shopt -u dotglob
|
||||
|
||||
# Loop the directories
|
||||
for i in "${DIRS[@]}"
|
||||
do
|
||||
echo $i
|
||||
# Stow adopt, like -d, but it replaces the content in stow dir with
|
||||
# what already exists
|
||||
stow --adopt $i
|
||||
done
|
||||
|
||||
# Now to revert the --adopt, and make it act like -d
|
||||
# !Make sure there's nothing new/uncommited in dotfiles dir first
|
||||
#git --reset hard
|
||||
|
||||
Loading…
Reference in New Issue