david/scripts-archive
david
/
scripts-archive
Archived
1
0
Fork 0
This repository has been archived on 2022-04-16. You can view files and clone it, but cannot push or open issues or pull requests.
scripts-archive/install_moka.sh

54 lines
1.2 KiB
Bash
Executable File

#!/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