1
0
mirror of https://gitlab.com/ceda_ei/wish synced 2025-12-14 20:50:10 +01:00

Use git if it exists in install script

This commit is contained in:
2019-05-15 13:25:33 +05:30
parent f1b966c5e0
commit 31ec315ffd
2 changed files with 12 additions and 8 deletions

View File

@@ -1,11 +1,16 @@
#!/usr/bin/env bash
curl https://gitlab.com/ceda_ei/wish/-/archive/master/wish-master.tar -o /tmp/wish.tar
mkdir $HOME/.config 2> /dev/null
cd /tmp/
tar xf wish.tar
mv wish-master/ wish/
mv wish/ $HOME/.config/
if hash git; then
git clone https://gitlab.com/ceda_ei/wish.git $HOME/.config/wish.git
else
curl https://gitlab.com/ceda_ei/wish/-/archive/master/wish-master.tar -o /tmp/wish.tar
mkdir $HOME/.config 2> /dev/null
cd /tmp/
tar xf wish.tar
mv wish-master/ wish/
mv wish/ $HOME/.config/
fi
cat >> ~/.bashrc <<EOF
# Wish
@@ -14,4 +19,3 @@ WISH_PLUGINS=(exit_code_smiley bg_jobs date path newline vcs)
WISH_THEME=plain
source ~/.config/wish/wish.sh
EOF