Update setup script
This commit is contained in:
parent
9632445b71
commit
027b391f93
@ -6,19 +6,24 @@ setopt LOCAL_OPTIONS ERR_RETURN NO_UNSET PIPE_FAIL
|
||||
local repo_address="https://schlomp.space/tastytea/dotfiles.git"
|
||||
local tmp_git_command='git --git-dir=${HOME}/.dotfiles/ --work-tree=${HOME}'
|
||||
if [[ -f ~/.ssh/noid_dotfiles ]]; then
|
||||
print -P "%F{12}Using dotfiles SSH-key%f"
|
||||
repo_address="git@schlomp.space:tastytea/dotfiles.git"
|
||||
export GIT_SSH_COMMAND="ssh -i ~/.ssh/noid_dotfiles"
|
||||
tmp_git_command="GIT_SSH_COMMAND=\"ssh -i ~/.ssh/noid_dotfiles\" ${tmp_git_command}"
|
||||
else
|
||||
print -P "%F{12}No dotfiles SSH-key found, using HTTP access%f"
|
||||
fi
|
||||
alias config="${tmp_git_command}"
|
||||
alias config=${tmp_git_command}
|
||||
|
||||
git clone --bare ${repo_address} "${HOME}/.dotfiles" && \
|
||||
config submodule init && \
|
||||
config submodule update && \
|
||||
config config --local status.showUntrackedFiles no && \
|
||||
config config --local submodule.recurse true && \
|
||||
print "Run \033[1;32mrm ${0} && ${tmp_git_command} checkout\033[0m" \
|
||||
"to copy the files to your home directory."
|
||||
git clone --bare ${repo_address} ${HOME}/.dotfiles
|
||||
config config --local status.showUntrackedFiles no
|
||||
config config --local submodule.recurse true
|
||||
|
||||
print -P "%F{12}Run%f" \
|
||||
"%F{13}rm ${0} &&" \
|
||||
"${tmp_git_command} checkout &&" \
|
||||
"config submodule update --init%f" \
|
||||
"%F{12}to copy the files to your home directory.%f"
|
||||
|
||||
# TODO: [remote "origin"] needs to have
|
||||
# fetch = +refs/heads/*:refs/remotes/origin/* in order for
|
||||
|
Loading…
x
Reference in New Issue
Block a user