chore: redo how dirs are done
parent
257da31235
commit
9e30a75c85
26
post-install
26
post-install
|
@ -16,27 +16,19 @@ echo $os
|
||||||
|
|
||||||
|
|
||||||
# ensure some directories exist
|
# ensure some directories exist
|
||||||
gitDir="~/git"
|
mkdir -p ~/git/
|
||||||
[ ! -d $gitDir ] && mkdir -p $gitDir || echo $gitDir" already exists"
|
mkdir -p ~/.ssh/
|
||||||
|
mkdir -p ~/.config/
|
||||||
sshDir="~/.ssh"
|
mkdir -p ~/bin/
|
||||||
[ ! -d $sshDir ] && mkdir -p $sshDir || echo $sshDir" already exists"
|
|
||||||
|
|
||||||
configDir="~/.config"
|
|
||||||
[ ! -d $configDir ] && mkdir -p $configDir || echo $configDir" already exists"
|
|
||||||
|
|
||||||
userBinDir="~/bin"
|
|
||||||
[ ! -d $userBinDir ] && mkdir -p $userBinDir || echo $userBindir" already exists"
|
|
||||||
|
|
||||||
|
|
||||||
# create an ssh key, for use with git/github
|
# create an ssh key, for use with git/github
|
||||||
ssh-keygen -t ed25519 -f $sshDir"/id_ed25519_git" -N ''
|
ssh-keygen -t ed25519 -f "~/.ssh/id_ed25519_git" -N ''
|
||||||
|
|
||||||
setup_config()
|
setup_config()
|
||||||
{
|
{
|
||||||
|
cd ~
|
||||||
git clone https://github.com/crimsontome/config;
|
git clone https://github.com/crimsontome/config;
|
||||||
cp -f config/bin/* $userBinDir;
|
cp -f config/bin/* ~/bin;
|
||||||
if [[ $os == "Ubuntu" ]]; then
|
if [[ $os == "Ubuntu" ]]; then
|
||||||
cp -f config/ub-server/.bashrc ~/;
|
cp -f config/ub-server/.bashrc ~/;
|
||||||
elif [[ $os == "Fedora" ]]; then
|
elif [[ $os == "Fedora" ]]; then
|
||||||
|
@ -48,7 +40,7 @@ setup_config()
|
||||||
exit;
|
exit;
|
||||||
fi
|
fi
|
||||||
cp -f config/.gitconfig ~/;
|
cp -f config/.gitconfig ~/;
|
||||||
cp -f config/.ssh/config $sshDir/config
|
cp -f config/.ssh/config .ssh/config
|
||||||
}
|
}
|
||||||
# check package manager
|
# check package manager
|
||||||
if [[ $os == "Ubuntu" ]]; then
|
if [[ $os == "Ubuntu" ]]; then
|
||||||
|
@ -70,7 +62,7 @@ else
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $gitdir;
|
cd ~/git/;
|
||||||
pwd
|
pwd
|
||||||
gh auth login;
|
gh auth login;
|
||||||
# after logged into gh
|
# after logged into gh
|
||||||
|
|
Loading…
Reference in New Issue