2022-03-18 14:34:27 +01:00
|
|
|
#!/bin/zsh
|
|
|
|
|
2022-03-18 22:18:06 +01:00
|
|
|
_tmp_config_alias='git --git-dir=${HOME}/.dotfiles/ --work-tree=${HOME}'
|
|
|
|
if [[ -f ~/.ssh/noid_dotfiles ]]; then
|
|
|
|
export GIT_SSH_COMMAND="ssh -i ~/.ssh/noid_dotfiles"
|
|
|
|
_tmp_config_alias="GIT_SSH_COMMAND=\"ssh -i ~/.ssh/noid_dotfiles\" ${_tmp_config_alias}"
|
2022-03-18 14:34:27 +01:00
|
|
|
fi
|
2022-03-18 22:18:06 +01:00
|
|
|
alias config="${_tmp_config_alias}"
|
2022-03-18 14:34:27 +01:00
|
|
|
|
|
|
|
git clone --bare git@schlomp.space:tastytea/dotfiles.git "${HOME}/.dotfiles" && \
|
|
|
|
config submodule init && \
|
|
|
|
config submodule update && \
|
|
|
|
config config --local status.showUntrackedFiles no && \
|
|
|
|
config config --local submodule.recurse true && \
|
2022-03-18 22:18:06 +01:00
|
|
|
echo -e "Run \033[1;32mrm ${0} && ${_tmp_config_alias} checkout\033[0m to copy the files to your home directory."
|
2022-03-18 14:34:27 +01:00
|
|
|
unset tmp_alias_config
|
|
|
|
|
|
|
|
# TODO: [remote "origin"] needs to have
|
|
|
|
# fetch = +refs/heads/*:refs/remotes/origin/* in order for
|
|
|
|
# submodule.recurse to work, but why?
|