From ef1c5be4ca991a9551344de1cc263f1596d962eb Mon Sep 17 00:00:00 2001 From: CrimsonTome Date: Wed, 23 Nov 2022 09:08:04 +0000 Subject: [PATCH] fix: setup config and ssh key fix --- post-install | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/post-install b/post-install index d654337..2ab2edd 100755 --- a/post-install +++ b/post-install @@ -32,7 +32,24 @@ userBinDir="~/bin" # create an ssh key, for use with git/github ssh-keygen -t ed25519 -f $sshDir"/id_ed25519_git" -N '' +setup_config() +{ + git clone https://github.com/crimsontome/config; + cp -f config/bin/* $userBinDir; + if [[ $os == "Ubuntu" ]]; then + cp -f config/ub-server/.bashrc ~/; + elif [[ $os == "Fedora" ]]; then + cp -f config/fedora/.bashrc ~/; + elif [[ $os == "Arch" ]]; then + cp -f config/arch/.bashrc ~/; + else + echo "OS specific bashrc not yet supported"; + exit; + fi + cp -f config/.gitconfig ~/; + cp -f config/.ssh/config $sshDir/config +} # check package manager if [[ $os == "Ubuntu" ]]; then echo "using apt package manager"; @@ -53,31 +70,10 @@ else fi -setup_config() -{ - - git clone https://github.com/crimsontome/config; - cp -f config/bin/* $userBinDir; - if [[ $os == "Ubuntu" ]]; then - cp -f config/ub-server/.bashrc ~/; - elif [[ $os == "Fedora" ]]; then - cp -f config/fedora/.bashrc ~/; - elif [[ $os == "Arch" ]]; then - cp -f config/arch/.bashrc ~/; - else - echo "OS specific bashrc not yet supported"; - exit; - fi - cp -f config/.gitconfig ~/; - cp -f config/.ssh/config $sshDir/config -} - cd $gitdir; gh auth login; # after logged into gh -# set up ssh keys -firefox https://github.com/settings/ssh/new #TODO: do gpg stuff toO