2021-08-31 21:42:35 +00:00
|
|
|
#!/usr/bin/bash
|
|
|
|
# Dot - manage your dotfiles using stow,
|
|
|
|
# run it outside of the folder/file you want to back up
|
|
|
|
# $ dotstow file-or-program
|
|
|
|
# This program was made by joelchrono12
|
|
|
|
|
|
|
|
# Set up your dotfiles folder
|
2022-12-15 19:34:22 +00:00
|
|
|
STOW_DIR=$HOME/git/dotfiles/stow_home
|
2021-08-31 21:42:35 +00:00
|
|
|
# $1 is the program you chose
|
|
|
|
DIR=$(pwd | cut -d '/' -f4-)
|
|
|
|
NEW_DIR=$STOW_DIR/$1/$DIR
|
|
|
|
mkdir -pv $NEW_DIR
|
|
|
|
mv -v $1 $NEW_DIR
|
|
|
|
cd $STOW_DIR
|
|
|
|
stow -vt ~ $1
|