Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update install.sh #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update install.sh #1

wants to merge 1 commit into from

Conversation

mtivi
Copy link

@mtivi mtivi commented Dec 23, 2021

Some thoughts for restructuring the install script. This is similar to what I came up with, with your repo as a starting point.
I found that the emoji output makes it easier to keep track of the progress.

I wanted to avoid cloning the repository using HTTPS. I added a one time copy/paste snippet to my README.md to help get things up and running quicker.

 export DOTFILE_REPO="[email protected]:mtjakewies/.dotfiles.git "              
 export GH_SSH_PRIVATE="$HOME/.ssh/id_ed25519"                    
 export GH_SSH_PUBLIC="${GH_SSH_PRIVATE}.pub"                           
                                                                        
 function dotInstall() {                                                
     echo "Generating new SSH key to interact with dotfiles repository."
     ssh-keygen -t ed25519 \
         -C "$USER" \
         -f $GH_SSH_PRIVATE                                             
     eval "$(ssh-agent -s)"                                             
     ssh-add $GH_SSH_PRIVATE                                            
     echo "✨ New key generated."                                                                                                                        
     while ! [ -d "$HOME/.dotfiles" ]                                   
     do                                                                 
         echo "Add your new key to https://github.com/settings/ssh/new"    
         echo "- - - - -"                                               
         cat $GH_SSH_PUBLIC                                             
         echo "- - - - -"                                               
     echo "Once your key is add, press return to continue."             
     read                                                           
     git clone $DOTFILE_REPO                                            
     done                                                                                          
     echo "🚀 Running install script "                                                   
     ~/.dotfiles/install.sh              # install script should be made +x in git index   
     return 0                                                           
 }                                                                      
 dotInstall && source ~/.nix-profile/etc/profile.d/nix.sh &&  zsh

@jakewies

Some thoughts for restructuring the install script. This is similar to what I came up with, with your repo as a starting point.
I found that the emoji output makes it easier to keep track of the progress.

I wanted to avoid cloning the repository using HTTPS. I added a one time copy/paste snippet to my `README.md` to help get things up and running quicker.

```sh
 export DOTFILE_REPO="[email protected]:mtjakewies/.dotfiles.git "              
 export GH_SSH_PRIVATE="$HOME/.ssh/id_ed25519"                    
 export GH_SSH_PUBLIC="${GH_SSH_PRIVATE}.pub"                           
                                                                        
 function dotInstall() {                                                
     echo "Generating new SSH key to interact with dotfiles repository."
     ssh-keygen -t ed25519 \
         -C "$USER" \
         -f $GH_SSH_PRIVATE                                             
     eval "$(ssh-agent -s)"                                             
     ssh-add $GH_SSH_PRIVATE                                            
     echo "✨ New key generated."                                                                                      
     CLONE_SUCCESSFUL=1                                                 
     while ! [ -d "$HOME/.dotfiles" ]                                   
     do                                                                 
         echo "Add your new key to https://github.com/settings/ssh/new"    
         echo "- - - - -"                                               
         cat $GH_SSH_PUBLIC                                             
         echo "- - - - -"                                               
     echo "Once your key is add, press return to continue."             
     read                                                           
     git clone $DOTFILE_REPO                                            
     done                                                                                          
     echo "🚀 Running install script "                                                   
     ~/.dotfiles/install.sh              # install script should be made +x in git index   
     return 0                                                           
 }                                                                      
 dotInstall && source ~/.nix-profile/etc/profile.d/nix.sh &&  zsh
```
@mtivi mtivi marked this pull request as draft December 23, 2021 01:21
@mtivi mtivi marked this pull request as ready for review December 23, 2021 01:22
@jakewies
Copy link
Owner

@mtivi sorry for the late reply, I was on holiday. this looks really interesting! I appreciate the time to open a PR. I'm going to dive into this a little bit later and see how it goes :)

@uzielnrtec
Copy link

Some thoughts for restructuring the install script. This is similar to what I came up with, with your repo as a starting point.
I found that the emoji output makes it easier to keep track of the progress.

I wanted to avoid cloning the repository using HTTPS. I added a one time copy/paste snippet to my README.md to help get things up and running quicker.

 export DOTFILE_REPO="[email protected]:mtjakewies/.dotfiles.git "              
 export GH_SSH_PRIVATE="$HOME/.ssh/id_ed25519"                    
 export GH_SSH_PUBLIC="${GH_SSH_PRIVATE}.pub"                           
                                                                        
 function dotInstall() {                                                
     echo "Generating new SSH key to interact with dotfiles repository."
     ssh-keygen -t ed25519 \
         -C "$USER" \
         -f $GH_SSH_PRIVATE                                             
     eval "$(ssh-agent -s)"                                             
     ssh-add $GH_SSH_PRIVATE                                            
     echo "✨ New key generated."                                                                                                                        
     while ! [ -d "$HOME/.dotfiles" ]                                   
     do                                                                 
         echo "Add your new key to https://github.com/settings/ssh/new"    
         echo "- - - - -"                                               
         cat $GH_SSH_PUBLIC                                             
         echo "- - - - -"                                               
     echo "Once your key is add, press return to continue."             
     read                                                           
     git clone $DOTFILE_REPO                                            
     done                                                                                          
     echo "🚀 Running install script "                                                   
     ~/.dotfiles/install.sh              # install script should be made +x in git index   
     return 0                                                           
 }                                                                      
 dotInstall && source ~/.nix-profile/etc/profile.d/nix.sh &&  zsh

@jakewies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants