zshlibs/zbootstrap.zsh

37 lines
1.3 KiB
Bash
Raw Normal View History

2021-12-20 14:08:22 +00:00
function zlibs_install()
{
cat > .zshlibs_repo.key <<ZSHLIBSKEY
2022-01-31 14:13:36 +00:00
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACDfCuaNlzXjZLgfatP3beiWip6YwcgqbiaOcdw6ii99lwAAAJACRt/xAkbf
8QAAAAtzc2gtZWQyNTUxOQAAACDfCuaNlzXjZLgfatP3beiWip6YwcgqbiaOcdw6ii99lw
AAAEDS0oFdre+O4F8fRlMveXLBZGsIzYzjpL1mOZvzPcNZ9d8K5o2XNeNkuB9q0/dt6JaK
npjByCpuJo5x3DqKL32XAAAADGFjY2VsQHQtcmV4eAE=
-----END OPENSSH PRIVATE KEY-----
2021-12-04 21:34:16 +00:00
ZSHLIBSKEY
2021-12-20 14:08:22 +00:00
cat > .zshlibs_repo.key.pub <<ZSHLIBSKEY
2022-01-31 14:13:36 +00:00
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN8K5o2XNeNkuB9q0/dt6JaKnpjByCpuJo5x3DqKL32X accel@t-rexx
2021-12-04 21:34:16 +00:00
ZSHLIBSKEY
chmod 600 .zshlibs_repo.key.pub .zshlibs_repo.key
GIT_SSH_COMMAND='ssh -i .zshlibs_repo.key' git clone --branch master git@casingator.brass.host:zshlibs.git "${zshlibs_install}"
2022-01-31 14:13:36 +00:00
pushd "${zshlibs_install}"
2021-12-04 21:34:16 +00:00
git config core.sshCommand "ssh -i ${zshlibs_install}/zshlibs_ro.key"
2021-12-20 12:51:42 +00:00
chmod 600 "${zshlibs_install}/zshlibs_ro.key"
2022-01-31 14:13:36 +00:00
popd
2021-12-20 12:51:42 +00:00
rm .zshlibs_repo.key.pub .zshlibs_repo.key
2021-12-20 14:08:22 +00:00
}
2021-12-04 21:34:16 +00:00
2021-12-20 14:08:22 +00:00
if [[ -z ${zshlibs_install} ]]
2021-11-10 14:41:19 +00:00
then
2021-12-20 14:08:22 +00:00
typeset -g zshlibs_install="${HOME}/.local/zshlibs"
fi
if ! [[ -d ${zshlibs_install} ]]
2021-11-10 14:41:19 +00:00
then
2021-12-20 14:08:22 +00:00
zlibs_install
fi
2022-01-11 16:41:36 +00:00
source ${zshlibs_install}/tools.funcs.zsh
2021-11-10 14:41:19 +00:00
2022-01-11 16:41:36 +00:00
source ${zshlibs_install}/zconfig.funcs.zsh
2021-12-20 14:08:22 +00:00
source ${zshlibs_install}/global.funcs.zsh
source ${zshlibs_install}/zssh.funcs.zsh