papirus-icon-theme/install-papirus-home-gtk.sh

49 lines
1.3 KiB
Bash
Raw Normal View History

2016-11-25 18:38:40 -05:00
#!/bin/sh
set -e
2016-11-27 07:32:03 -05:00
gh_repo="papirus-icon-theme"
2016-11-28 05:54:17 -05:00
gh_desc="Papirus icon theme GTK"
2016-11-26 10:10:12 -05:00
cat <<- EOF
2016-11-25 18:38:40 -05:00
ppppp ii
pp pp aaaaa ppppp rr rrr uu uu sssss
ppppp aa aa pp pp ii rrrr uu uu ssss
pp aa aa pp pp ii rr uu uu ssss
pp aaaaa ppppp ii rr uuuuu sssss
pp
pp
2016-11-26 10:10:12 -05:00
$gh_desc
https://github.com/PapirusDevelopmentTeam/$gh_repo
2016-11-25 18:38:40 -05:00
EOF
temp_dir=$(mktemp -d)
echo "=> Getting the latest version from GitHub ..."
2016-11-26 10:14:44 -05:00
wget -O "/tmp/$gh_repo.tar.gz" \
2016-11-26 10:10:12 -05:00
https://github.com/PapirusDevelopmentTeam/$gh_repo/archive/master.tar.gz
2016-11-25 18:38:40 -05:00
echo "=> Unpacking archive ..."
2016-11-26 10:10:12 -05:00
tar -xzf "/tmp/$gh_repo.tar.gz" -C "$temp_dir"
echo "=> Deleting old $gh_desc ..."
2016-11-28 05:54:17 -05:00
rm -rf ~/.icons/Papirus
rm -rf ~/.icons/Papirus-Dark
rm -rf ~/.icons/Papirus-GTK
rm -rf ~/.icons/Papirus-Dark-GTK
2016-11-25 18:38:40 -05:00
echo "=> Installing ..."
mkdir -p ~/.icons
2016-11-25 18:38:40 -05:00
cp --no-preserve=mode,ownership -r \
2016-11-27 07:32:03 -05:00
"$temp_dir/$gh_repo-master/Papirus" \
"$temp_dir/$gh_repo-master/Papirus-Dark" ~/.icons/
gtk-update-icon-cache -q ~/.icons/Papirus || true
gtk-update-icon-cache -q ~/.icons/Papirus-Dark || true
2016-11-25 18:38:40 -05:00
echo "=> Clearing cache ..."
2016-11-26 10:10:12 -05:00
rm -rf "/tmp/$gh_repo.tar.gz" "$temp_dir"
2016-11-25 18:38:40 -05:00
echo "=> Done!"