Configuration files for my GNU/Linux installation.
You can not 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/applydots.sh

28 lines
540 B

#!/usr/bin/sh
applydots() {
4 years ago
cfgPath=$HOME/.config
backupPath=$HOME/.config_backup
curdate=$(date +"%Y-%m-%d-%T")
4 years ago
echo "Creating backup at \"$backupPath/$curdate\"..."
mkdir -p $backupPath
cp -r $cfgPath $backupPath/$curdate # create backup
4 years ago
echo "Installing dotfiles..."
# copy over the dotfiles
cp -rf $PWD/.config/* $cfgPath/
4 years ago
echo "Done."
}
while true; do
4 years ago
read -p "Do you wish to install the dotfiles? [yn] " yn
case $yn in
[Yy]* ) applydots; break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done