begone thot
This commit is contained in:
31
update.sh
31
update.sh
@ -1,31 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cd ~/.dotfiles
|
|
||||||
echo "Checking for dotfile updates..."
|
|
||||||
git fetch
|
|
||||||
|
|
||||||
if [ $(git rev-parse HEAD) == $(git rev-parse @{u}) ]
|
|
||||||
then
|
|
||||||
if [ "$1" == -y ]
|
|
||||||
then
|
|
||||||
echo "Updating..."
|
|
||||||
git pull >> /dev/null
|
|
||||||
echo "Updated successfully"
|
|
||||||
echo "Sourcing new changes..."
|
|
||||||
source ./source
|
|
||||||
echo "Sourced new changes successfully"
|
|
||||||
else
|
|
||||||
read -p "Dotfiles can be updated. Do you want to proceed? (y/n) " choice
|
|
||||||
if [ "$choice" = "y" ]
|
|
||||||
then
|
|
||||||
echo "Updating..."
|
|
||||||
git pull >> /dev/null
|
|
||||||
echo "Updated successfully"
|
|
||||||
echo "Sourcing new changes..."
|
|
||||||
source ./source
|
|
||||||
echo "Sourced new changes successfully"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Dotfiles are up-to-date"
|
|
||||||
fi
|
|
Reference in New Issue
Block a user