mirror of
https://github.com/Ascyii/dotfiles.git
synced 2026-01-01 06:54:24 -05:00
17 lines
273 B
Bash
Executable File
17 lines
273 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
pkg="$1"
|
|
|
|
stow --dotfiles --no "$pkg" 2>&1 |
|
|
grep 'cannot stow' |
|
|
sed -E 's/.*existing target ([^ ]+).*/\1/' |
|
|
while read -r f; do
|
|
echo "Removing $HOME/$f with force"
|
|
rm -rf -- "$HOME/$f"
|
|
done
|
|
|
|
stow --dotfiles "$pkg"
|
|
echo "Stowed $pkg"
|