added a script for installing the moka icon theme
This commit is contained in:
parent
4767ad3b9b
commit
612904151e
|
@ -0,0 +1,53 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# moka icon theme install script
|
||||||
|
|
||||||
|
tempdir="/tmp/moka"
|
||||||
|
baseurl="https://github.com/snwh"
|
||||||
|
repolist="moka-icon-theme
|
||||||
|
moka-icon-theme-extras
|
||||||
|
moka-icon-theme-symbolic
|
||||||
|
moka-icon-theme-dark
|
||||||
|
moka-icon-theme-blue"
|
||||||
|
|
||||||
|
if [ $(whoami) != "root" ]; then
|
||||||
|
echo "you are not running this script with root privileges."
|
||||||
|
echo -e "installing moka-icon-theme only for $(whoami). continue? (y/n) \c"
|
||||||
|
read choice
|
||||||
|
if [ $choice != "y" ] && [ $choice != "Y" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "you are running this script with root privileges."
|
||||||
|
echo -e "installing moka-icon-theme systemwide. continue? (y/n) \c"
|
||||||
|
read choice
|
||||||
|
if [ $choice != "y" ] && [ $choice != "Y" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d $tempdir ]; then
|
||||||
|
rm -r $tempdir
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "cloning repositories to $tempdir"
|
||||||
|
for theme in $repolist; do
|
||||||
|
mkdir $tempdir; cd $tempdir
|
||||||
|
git clone $baseurl/$theme".git"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "you might not have git installed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ $(whoami) != "root" ]; then
|
||||||
|
cp -r $tempdir/$theme/Mok* $HOME/.icons
|
||||||
|
else
|
||||||
|
cp -r $tempdir/$theme/Mok* /usr/share/icons
|
||||||
|
fi
|
||||||
|
cd -
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "cleaning up"
|
||||||
|
rm -r $tempdir
|
||||||
|
echo "everything done"
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue