スクリプトを使用してMint-Yテーマとアイコンを更新する方法

スクリプトを使用してMint-Yテーマとアイコンを更新する方法

状態:

Mint-Yは進行中の作業であり、Linux Mint 18がリリースされた後もあなたのフィードバックに基づいて変更と改善を続けます。

源泉:https://www.linuxmint.com/rel_sarah_cinnamon_whatsnew.php

目的:
更新プロセスを自動化するスクリプトを作成します。

編集1:
バージョンが安定したパッケージでリリースされたため、このスクリプトを使用する必要はありません。パッケージ名は次のとおりです。

mint-y-theme
mint-y-icons

ベストアンサー1

ユーザー名を自分のものに変更するだけです。

#!/bin/bash


# https://github.com/linuxmint/mint-y-theme/
# https://github.com/linuxmint/mint-y-icons/


red='\033[1;31m'
green='\033[1;32m'
nocolor='\033[0m'


mkdir -p ~/Downloads/themes-mint/


rm -r -f ~/Downloads/themes-mint/mint-y-theme-master/
rm -r -f ~/Downloads/themes-mint/mint-y-icons-master/


mv ~/Downloads/themes-mint/themes.zip ~/Downloads/themes-mint/themesOLD.zip
mv ~/Downloads/themes-mint/icons.zip ~/Downloads/themes-mint/iconsOLD.zip


wget -q --show-progress -O ~/Downloads/themes-mint/themes.zip https://github.com/linuxmint/mint-y-theme/archive/master.zip
wget -q --show-progress -O ~/Downloads/themes-mint/icons.zip https://github.com/linuxmint/mint-y-icons/archive/master.zip


if ! diff -q ~/Downloads/themes-mint/themes.zip ~/Downloads/themes-mint/themesOLD.zip > /dev/null 2>&1;
then

  unzip -qq -o ~/Downloads/themes-mint/themes.zip -d ~/Downloads/themes-mint/
  cp -r ~/Downloads/themes-mint/mint-y-theme-master/usr/share/themes/* ~/.themes/
  sudo cp -r /home/vlastimil/Downloads/themes-mint/mint-y-theme-master/usr/share/themes/* /usr/share/themes/

  echo -e "Themes ${red}were${nocolor} changed"

else

  echo -e "Themes ${green}not${nocolor} changed"

fi


if ! diff -q ~/Downloads/themes-mint/icons.zip ~/Downloads/themes-mint/iconsOLD.zip > /dev/null 2>&1;
then

  unzip -qq -o ~/Downloads/themes-mint/icons.zip -d ~/Downloads/themes-mint/
  cp -r ~/Downloads/themes-mint/mint-y-icons-master/usr/share/icons/* ~/.icons/
  sudo cp -r /home/vlastimil/Downloads/themes-mint/mint-y-icons-master/usr/share/icons/* /usr/share/icons/

  echo -e "Icons  ${red}were${nocolor} changed"

else

  echo -e "Icons  ${green}not${nocolor} changed"

fi

おすすめ記事