chore: mv config setup to function

main
CrimsonTome 2022-11-23 00:24:57 +00:00 committed by Rowan Clark
parent a131ecc056
commit 200733b43c
No known key found for this signature in database
GPG Key ID: F620D51904044094
1 changed files with 24 additions and 9 deletions

View File

@ -41,22 +41,37 @@ if [[ $os == "Ubuntu" ]]; then
cat snap-packages| xargs -n 1 sudo snap install --classic; cat snap-packages| xargs -n 1 sudo snap install --classic;
wget https://dl.discordapp.net/apps/linux/0.0.21/discord-0.0.21.deb; wget https://dl.discordapp.net/apps/linux/0.0.21/discord-0.0.21.deb;
sudo apt install ./discord-0.0.21.deb; sudo apt install ./discord-0.0.21.deb;
git clone https://github.com/crimsontome/config; setup_config $os;
cp -f config/bin/* $userBinDir;
cp -f config/ub-server/.bashrc ~/;
cp -f config/.gitconfig ~/;
cp -f config/.ssh/config $sshDir/config
elif [[ $os == "Fedora" ]]; then elif [[ $os == "Fedora" ]]; then
echo "dnf is not yet supported"; echo "dnf is not yet supported";
exit; setup_config $os;
elif [[ $os == "Arch" ]]; then elif [[ $os == "Arch" ]]; then
echo "pacman is not yet supported"; echo "pacman is not yet supported";
exit; setup_config $os;
else else
echo "OS not yet supported"; echo "OS package manager is not yet supported";
exit;
fi 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; cd $gitdir;
gh auth login; gh auth login;
# after logged into gh # after logged into gh