move stub updates to base/updates.zsh, allow install from stub
This commit is contained in:
parent
74116e798f
commit
bc79de9acf
@ -6,4 +6,16 @@ if type git &> /dev/null; then
|
|||||||
git pull &> ~/.local/share/zeesh/pull.log
|
git pull &> ~/.local/share/zeesh/pull.log
|
||||||
|
|
||||||
cd "${start_dir}"
|
cd "${start_dir}"
|
||||||
|
|
||||||
|
_zshrc_updates_pending=0
|
||||||
|
|
||||||
|
if type md5sum &> /dev/null; then
|
||||||
|
cmp -s ~/.zshrc ~/.local/share/zeesh/zshrc-stub
|
||||||
|
if [[ $? -eq 1 ]]; then
|
||||||
|
cp ~/.local/share/zeesh/zshrc-stub ~/.zshrc
|
||||||
|
_zshrc_updates_pending=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
[[ _zshrc_updates_pending -eq 1 ]] && printf "zeesh: stub updates pending\n"
|
||||||
fi
|
fi
|
||||||
|
16
zshrc-stub
16
zshrc-stub
@ -5,18 +5,16 @@ autoload -U colors && colors
|
|||||||
PROMPT="%{$fg[cyan]%}%n%{$fg[white]%}@%{$fg[magenta]%}%m %{$fg[white]%}%~ %# "
|
PROMPT="%{$fg[cyan]%}%n%{$fg[white]%}@%{$fg[magenta]%}%m %{$fg[white]%}%~ %# "
|
||||||
RPROMPT="%{$fg_bold[black]%}%T%{$reset_color%}"
|
RPROMPT="%{$fg_bold[black]%}%T%{$reset_color%}"
|
||||||
|
|
||||||
_zshrc_updates_pending=0
|
if [[ ! -d ~/.local/share/zeesh ]]; then
|
||||||
|
if type git &> /dev/null; then
|
||||||
if type md5sum &> /dev/null; then
|
printf "zeesh: installing"
|
||||||
cmp -s ~/.zshrc ~/.local/share/zeesh/zshrc-stub
|
git clone git://vcs.lavacano.net/zeesh.git ~/.local/share/zeesh &> ~/zeesh-install.log
|
||||||
if [[ $? -eq 1 ]]; then
|
else
|
||||||
cp ~/.local/share/zeesh/zshrc-stub ~/.zshrc
|
printf "zeesh: cannot install without git\n"
|
||||||
_zshrc_updates_pending=1
|
return
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ _zshrc_updates_pending -eq 1 ]] && printf "zeesh: stub updates pending\n"
|
|
||||||
|
|
||||||
# kick things off
|
# kick things off
|
||||||
fpath=(
|
fpath=(
|
||||||
~/.local/share/zeesh/plugins
|
~/.local/share/zeesh/plugins
|
||||||
|
Loading…
Reference in New Issue
Block a user