add sourcing after update
This commit is contained in:
parent
7c6ca9dc76
commit
18728ab309
@ -4,13 +4,16 @@ cd ~/.dotfiles
|
||||
echo "Checking for dotfile updates..."
|
||||
git fetch
|
||||
|
||||
if [ $(git rev-parse HEAD) != $(git rev-parse @{u}) ]
|
||||
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" ]
|
||||
@ -18,6 +21,9 @@ then
|
||||
echo "Updating..."
|
||||
git pull >> /dev/null
|
||||
echo "Updated successfully"
|
||||
echo "Sourcing new changes..."
|
||||
source ./source
|
||||
echo "Sourced new changes successfully"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user