From 7159850e83084a3378920ec905ae563b37d8b88a Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Wed, 31 Jul 2024 23:31:16 +0800 Subject: [PATCH] papirus rework --- install/papirus | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/install/papirus b/install/papirus index ca7dfdd..1e576cb 100755 --- a/install/papirus +++ b/install/papirus @@ -1,34 +1,27 @@ #!/bin/bash ##makedesc: Install papirus-icon-theme (latest) +source `dirname $0`/../helpers || exit 255 -echo -echo "===============================================" -echo "Installing papirus-icon-theme (latest)..." -echo "===============================================" -echo +title -installed() { - command -v "$1" >/dev/null 2>&1 -} +mkdir -p "$HOME/install/papirus-icon-theme" "$HOME/.local/share/icons/" if installed git; then - mkdir -p "${HOME}/install/" - git clone https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git "${HOME}/install/papirus-icon-theme" --depth=1 --single-branch + clone_quick https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git "$HOME/install/" else - ! installed wget && sudo apt install -y wget - mkdir -p "${HOME}/install/papirus-icon-theme" - wget https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/archive/refs/heads/master.zip -O "${HOME}/install/papirus-icon-theme.zip" - unzip -oq "${HOME}/install/papirus-icon-theme.zip" -d "${HOME}/install/papirus-icon-theme" - rm -f "${HOME}/install/papirus-icon-theme.zip" + download https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/archive/refs/heads/master.zip -O "$HOME/install/papirus-icon-theme.zip" && \ + unzip -oq "$HOME/install/papirus-icon-theme.zip" -d "$HOME/install/papirus-icon-theme" && \ + rm -f "$HOME/install/papirus-icon-theme.zip" fi -mkdir -p "${HOME}/.local/share/icons/" -ln -sf "${HOME}/install/papirus-icon-theme/Papirus" "${HOME}/.local/share/icons/Papirus" -ln -sf "${HOME}/install/papirus-icon-theme/Papirus-Dark" "${HOME}/.local/share/icons/Papirus-Dark" -ln -sf "${HOME}/install/papirus-icon-theme/Papirus-Light" "${HOME}/.local/share/icons/Papirus-Light" +symlink "$HOME/install/papirus-icon-theme/Papirus" "$HOME/.local/share/icons/Papirus" && \ + symlink "$HOME/install/papirus-icon-theme/Papirus-Dark" "$HOME/.local/share/icons/Papirus-Dark" && \ + symlink "$HOME/install/papirus-icon-theme/Papirus-Light" "$HOME/.local/share/icons/Papirus-Light" + +[ $? = 0 ] && { + echo + success "Papirus icons installed!" + info "You can find them in $HOME/.local/share/icons/" + echo +} -echo -echo "Finish! Don't forget to change current icon theme." -echo "You can find them here:" -echo -e "\t${HOME}/.local/share/icons/" -echo