X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/blobdiff_plain/c3c90132516880a85f50273c482974c63a8a52fa..448e82a74c6ab7bb668e290e356a2b7a280b6485:/setup.sh diff --git a/setup.sh b/setup.sh old mode 100644 new mode 100755 index da98b14..7893144 --- a/setup.sh +++ b/setup.sh @@ -1,16 +1,42 @@ +if [ ! -d ~/dotfiles ]; then + echo "************** Cloning Dotfiles Directory" + cd ~; git clone git@github.com:edthedev/dotfiles.git +fi -# This setup script is for Kali Linux running under Linux subsystem for Windows -# Because yeah, I'm **that** guy. -## It makes total sense, I swear. +if [ ! -f ~/.ssh/id_rsa ]; then + echo "************** Generate an SSH key" + ssh-keygen +fi -# Setup git -sudo apt-get install git install vim -git config --global user.email "edward@delaporte.us" -git config --global user.name "Edward Delaporte" -git config --global core.editor /usr/bin/vim +if [ ! -f ~/.screenrc ]; then + echo "************** Setup Screen" + ln -s ~/dotfiles/screenrc ~/.screenrc +fi -# Setup PowerShell -sudo apt-get install powershell -chsh --shell /usr/bin/pwsh -mkdir -p /home/delaport/.config/powershell/ -ln -s ~/dotfiles/Microsoft.PowerShell_profile.ps1 ~/.config/powershell/Microsoft.PowerShell_profile.ps1 +if [ ! -f ~/.config/powershell/Microsoft.PowerShell_profile.ps1 ]; then + echo "************** Setup PowerShell" + chsh --shell /usr/bin/pwsh + mkdir -p ~/.config/powershell/ + ln -s ~/dotfiles/Microsoft.PowerShell_profile.ps1 ~/.config/powershell/Microsoft.PowerShell_profile.ps1 +fi + +if [ ! -f ~/.vimrc ]; then + echo "************** Link Vimrc" + ln -s ~/dotfiles/vimrc ~/.vimrc +fi + +if [ -f ~/.vimrc ]; then + echo "************** Configure Git to use Vim" + git config --global core.editor /usr/bin/vim +fi + +if [ -f ~/.gitconfig ]; then + echo "************** Configure Git user" + git config --global user.email "edward@delaporte.us" + git config --global user.name "Edward Delaporte" +fi + +echo "************** Reminder to setup GitHub key" +echo "https://github.com/settings/keys" +echo "vim .git/config -- add: url = git@github.com:edthedev/dotfiles.git" +cat ~/.ssh/id_rsa.pub