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
|
||||
cd $HOME/.dotfiles
|
||||
git reset --hard && git pull
|
||||
git pull --rebase --autostash
|
||||
fi
|
||||
if [ -d "${HOME}/.dotfiles-private" ]; then
|
||||
cd $HOME/.dotfiles-private
|
||||
git reset --hard && git pull
|
||||
git pull --rebase --autostash
|
||||
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'
|
||||
$DotFilesAutodetect = $true
|
||||
$DotFilesAllowNestedSymlinks = $true
|
||||
|
||||
Reference in New Issue
Block a user