mirror of
https://github.com/nikdoof/dotfiles.git
synced 2025-12-13 09:42:27 +00:00
Add Update-Dotfiles command
This commit is contained in:
4
bin/bin/pull-dotfiles → bin/bin/update-dotfiles
Executable file → Normal file
4
bin/bin/pull-dotfiles → bin/bin/update-dotfiles
Executable file → Normal file
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
if [ -d "${HOME}/.dotfiles" ]; then
|
if [ -d "${HOME}/.dotfiles" ]; then
|
||||||
cd $HOME/.dotfiles
|
cd $HOME/.dotfiles
|
||||||
git reset --hard && git pull
|
git pull --rebase --autostash
|
||||||
fi
|
fi
|
||||||
if [ -d "${HOME}/.dotfiles-private" ]; then
|
if [ -d "${HOME}/.dotfiles-private" ]; then
|
||||||
cd $HOME/.dotfiles-private
|
cd $HOME/.dotfiles-private
|
||||||
git reset --hard && git pull
|
git pull --rebase --autostash
|
||||||
fi
|
fi
|
||||||
@@ -14,6 +14,12 @@ function Add-SshKey {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Update-Dotfiles {
|
||||||
|
Join-Path $HOME '.dotfiles' | Push-Location
|
||||||
|
Invoke-Expression -Command "git pull --rebase --autostash"
|
||||||
|
Pop-Location
|
||||||
|
}
|
||||||
|
|
||||||
$DotFilesPath = Join-Path $HOME '.dotfiles'
|
$DotFilesPath = Join-Path $HOME '.dotfiles'
|
||||||
$DotFilesAutodetect = $true
|
$DotFilesAutodetect = $true
|
||||||
$DotFilesAllowNestedSymlinks = $true
|
$DotFilesAllowNestedSymlinks = $true
|
||||||
|
|||||||
Reference in New Issue
Block a user