You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dotfiles/stow_script.sh

22 lines
423 B
Bash

#!/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 --target ~/
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