From 5cb3f9656523af03e0c6cae6734cab00a82b76e5 Mon Sep 17 00:00:00 2001 From: Surferlul Date: Mon, 9 Aug 2021 05:03:00 +0200 Subject: [PATCH] improved install.sh --- install.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 4ab7f9f..efcad2b 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,10 @@ #!/usr/bin/env bash SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -[ -d "$HOME/.config/awesome" ] && tar cf $SCRIPT_DIR/previous.tar $HOME/.config/awesome/ && rm $HOME/.config/awesome/ -cp -r $SCRIPT_DIR $HOME/.config/ +CACHE_DIR="/tmp/surferlul_awesome" +[ -d "$CACHE_DIR" ] && rm -rf /tmp/surferlul_awesome +mkdir $CACHE_DIR +git clone https://github.com/Surferlul/awesome.git $CACHE_DIR +[ -d "$HOME/.config/awesome" ] && tar cf $CACHE_DIR/previous.tar $HOME/.config/awesome/ && rm -rf $HOME/.config/awesome/ +git clone https://github.com/vicious-widgets/vicious.git $CACHE_DIR/vicious +mv $CACHE_DIR $HOME/.config/awesome +[ "$1" != "--preserve-git" ] && rm -rf $HOME/.config/awesome/.git