From b6a1e38dba604e46ea4c62c6a2bd8c5021c629f9 Mon Sep 17 00:00:00 2001 From: Laurent Le Houerou Date: Thu, 2 Sep 2021 12:33:17 +0400 Subject: [PATCH] refacto par dossier --- .gitconfig => git/.gitconfig | 0 git/setup.ps1 | 1 + init.sh => setup.sh | 3 ++- posh_config.json => shell/posh_config.json | 0 powershell_profile.ps1 => shell/powershell_profile.ps1 | 0 setup.ps1 => shell/setup.ps1 | 7 ++----- 6 files changed, 5 insertions(+), 6 deletions(-) rename .gitconfig => git/.gitconfig (100%) create mode 100644 git/setup.ps1 rename init.sh => setup.sh (93%) rename posh_config.json => shell/posh_config.json (100%) rename powershell_profile.ps1 => shell/powershell_profile.ps1 (100%) rename setup.ps1 => shell/setup.ps1 (66%) diff --git a/.gitconfig b/git/.gitconfig similarity index 100% rename from .gitconfig rename to git/.gitconfig diff --git a/git/setup.ps1 b/git/setup.ps1 new file mode 100644 index 0000000..362e768 --- /dev/null +++ b/git/setup.ps1 @@ -0,0 +1 @@ +Copy-Item ./git/.gitconfig ~/.gitconfig \ No newline at end of file diff --git a/init.sh b/setup.sh similarity index 93% rename from init.sh rename to setup.sh index 32df310..c099fdf 100644 --- a/init.sh +++ b/setup.sh @@ -18,6 +18,7 @@ chsh -s /usr/bin/pwsh sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh sudo chmod +x /usr/local/bin/oh-my-posh -pwsh -c ./setup.ps1 +pwsh -c ./shell/setup.ps1 +pwsh -c ./git/setup.ps1 pwsh diff --git a/posh_config.json b/shell/posh_config.json similarity index 100% rename from posh_config.json rename to shell/posh_config.json diff --git a/powershell_profile.ps1 b/shell/powershell_profile.ps1 similarity index 100% rename from powershell_profile.ps1 rename to shell/powershell_profile.ps1 diff --git a/setup.ps1 b/shell/setup.ps1 similarity index 66% rename from setup.ps1 rename to shell/setup.ps1 index 29d33d1..77dc2c4 100644 --- a/setup.ps1 +++ b/shell/setup.ps1 @@ -1,10 +1,7 @@ Set-PSRepository -Name PSGallery -InstallationPolicy Trusted Install-Module -Name Terminal-Icons -Repository PSGallery Install-Module PSReadLine -AllowPrerelease -Force -RequiredVersion 2.2.0-beta1 - - mkdir -p (Split-Path -Path $PROFILE) -Copy-Item powershell_profile.ps1 $PROFILE +Copy-Item ./shell/powershell_profile.ps1 $PROFILE mkdir -p ~/.config/ohmyposh -Copy-Item posh_config.json ~/.config/ohmyposh/config.json -Copy-Item .gitconfig ~/.gitconfig \ No newline at end of file +Copy-Item ./shell/posh_config.json ~/.config/ohmyposh/config.json \ No newline at end of file