From d08ffe06f9a79b49d89139d1ac7c5cc10fc72edb Mon Sep 17 00:00:00 2001 From: srdusr Date: Tue, 4 Jun 2024 13:44:49 +0200 Subject: Add information on installing onto windows --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index a5aa54b..d29e590 100644 --- a/README.md +++ b/README.md @@ -50,15 +50,29 @@ $ echo ".cfg" >> .gitignore 2. Clone this repo ```bash +# bash $ git clone --bare https://github.com/srdusr/dotfiles.git $HOME/.cfg ``` +```ps1 +# ps1 (Windows) +# Clone the dotfiles repository into ~/.cfg (C:\Users\yourusername\.cfg) +git clone --bare https://github.com/srdusr/dotfiles.git $env:USERPROFILE/.cfg +git --git-dir=$HOME/.cfg --work-tree=$HOME checkout +``` + 3. Set up the alias 'config' ```bash +# bash $ alias config='git --git-dir=$HOME/.cfg --work-tree=$HOME' ``` +```ps1 +# ps1 (Windows) +echo '. "$HOME\Documents\PowerShell\Microsoft.PowerShell_profile.ps1"' > $PROFILE +``` + 4. Set local configuration into .cfg to ignore untracked files ```bash @@ -73,6 +87,20 @@ $ config checkout --- +### Installing onto a new Windows system + +```ps1 +Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force; ` +Invoke-WebRequest "https://github.com/srdusr/dotfiles/archive/master.zip" ` +-OutFile "$HOME\Downloads\dotfiles.zip"; ` +Expand-Archive -Path "$HOME\Downloads\dotfiles.zip" -DestinationPath "$HOME" -Force; ` +Move-Item -Path "$HOME\dotfiles-master\*" -Destination "$HOME" -Force; ` +Remove-Item -Path "$HOME\dotfiles-master" -Recurse -Force; ` +Start-Process -FilePath "$HOME\install.bat" +``` + +- - - + ## Dependencies - curl -- cgit v1.2.3