improved install.sh

This commit is contained in:
Surferlul 2021-08-09 05:03:00 +02:00
parent 46ded7a2f8
commit 5cb3f96565

View File

@ -1,4 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" 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/ CACHE_DIR="/tmp/surferlul_awesome"
cp -r $SCRIPT_DIR $HOME/.config/ [ -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