mirror of https://gitlab.com/ceda_ei/wish
Use git if it exists in install script
This commit is contained in:
parent
f1b966c5e0
commit
31ec315ffd
18
install.sh
18
install.sh
|
@ -1,11 +1,16 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
curl https://gitlab.com/ceda_ei/wish/-/archive/master/wish-master.tar -o /tmp/wish.tar
|
if hash git; then
|
||||||
mkdir $HOME/.config 2> /dev/null
|
git clone https://gitlab.com/ceda_ei/wish.git $HOME/.config/wish.git
|
||||||
cd /tmp/
|
else
|
||||||
tar xf wish.tar
|
curl https://gitlab.com/ceda_ei/wish/-/archive/master/wish-master.tar -o /tmp/wish.tar
|
||||||
mv wish-master/ wish/
|
mkdir $HOME/.config 2> /dev/null
|
||||||
mv wish/ $HOME/.config/
|
cd /tmp/
|
||||||
|
tar xf wish.tar
|
||||||
|
mv wish-master/ wish/
|
||||||
|
mv wish/ $HOME/.config/
|
||||||
|
fi
|
||||||
|
|
||||||
cat >> ~/.bashrc <<EOF
|
cat >> ~/.bashrc <<EOF
|
||||||
|
|
||||||
# Wish
|
# Wish
|
||||||
|
@ -14,4 +19,3 @@ WISH_PLUGINS=(exit_code_smiley bg_jobs date path newline vcs)
|
||||||
WISH_THEME=plain
|
WISH_THEME=plain
|
||||||
source ~/.config/wish/wish.sh
|
source ~/.config/wish/wish.sh
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ function wish_vcs_set_colors() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function wish_vcs_main() {
|
function wish_vcs_main() {
|
||||||
local op=$(git diff --numstat HEAD 2> /dev/null || echo -1)
|
local op=$(git diff --numstat 2> /dev/null || echo -1)
|
||||||
if [[ $op != "-1" ]]; then
|
if [[ $op != "-1" ]]; then
|
||||||
local git
|
local git
|
||||||
git="$git $WISH_VCS_GIT_SYMBOL "
|
git="$git $WISH_VCS_GIT_SYMBOL "
|
||||||
|
|
Loading…
Reference in New Issue