Subversion Repositories My Stuff

Compare Revisions

Ignore whitespace Rev 5 → Rev 6

/trunk/Bash/117383-gentoo-start-icon.svg
File deleted
/trunk/Bash/kde-icon.sh
28,9 → 28,15
PATH=`echo ~/.kde4/share/icons/`
else
echo
echo "Usage ./kde-icon.sh local | global [theme_name]"
echo "For example ./kde-icon.sh local OxygenRefit2-black-version"
echo "Usage ./kde-icon.sh local | global [theme_name] [restore]"
echo
echo "Examples:"
echo "If you want to change the icons just run:"
echo "./kde-icon.sh local OxygenRefit2-black-version"
echo
echo "If you want to restore old icons run:"
echo "./kde-icon.sh local OxygenRefit2-black-version restore"
echo
exit 1
fi
 
59,34 → 65,78
echo "Your rights seems ok"
echo
else
echo "You do not have write access to the theme path you will not be able to change the icons"
echo "You do not have write access to the theme path you will not be able to change the icons"
echo "Maybe you should run the script as root"
echo
exit 1
fi
 
echo "Downloading the logo icon"
echo
${WGET} --output-document=${ICON} ${URL} || die "downloading of the icon failed"
if [ "${3}" == "restore" ] ; then
echo "You requested restoration of previously stored icons"
echo
echo "Checking if stored copies of old icons are available and performing restore if possible"
for i in "${RESOLUTION[@]}";
do
echo processing ${PATH}${THEME}/$i/places/start-here-kde.png
if [ -w ${PATH}${THEME}/$i/places/start-here-kde.png.bak ]; then
if [ -w ${PATH}${THEME}/$i/places/start-here-kde.svg ]; then
echo "Removing svg icon: ${PATH}${THEME}/$i/places/start-here-kde.svg"
${RM} ${PATH}${THEME}/$i/places/start-here-kde.svg
echo
fi
echo "Restoring old icons"
${MV} -f ${PATH}${THEME}/$i/places/start-here-kde.png.bak ${PATH}/${THEME}/$i/places/start-here-kde.png
echo
else
echo "Can't find ${PATH}${THEME}/$i/places/start-here-kde.png.bak or you do not have write access to file"
echo
fi
done
echo "Finished"
echo "To see the changes you need to change the icon set using KDE system settings"
echo
else
echo "Downloading the logo icon"
echo
${WGET} --output-document=${ICON} ${URL} || die "downloading of the icon failed"
 
echo "Making backup of existing icons"
echo
for i in "${RESOLUTION[@]}";
do
echo procesing ${PATH}${THEME}/$i/places/start-here-kde.png
${MV} ${PATH}${THEME}/$i/places/start-here-kde.png ${PATH}/${THEME}/$i/places/start-here-kde.png.bak
done
echo "Making backup of existing icons"
echo
for i in "${RESOLUTION[@]}";
do
echo processing ${PATH}${THEME}/$i/places/start-here-kde.png
if [ -w ${PATH}${THEME}/$i/places/start-here-kde.png ]; then
if (${MV} -f ${PATH}${THEME}/$i/places/start-here-kde.png ${PATH}/${THEME}/$i/places/start-here-kde.png.bak) then
echo "Storing ${PATH}${THEME}/$i/places/start-here-kde.png as ${PATH}/${THEME}/$i/places/start-here-kde.png.bak succsesfull"
echo
else
echo "There was error while storing icon ${PATH}${THEME}/$i/places/start-here-kde.png"
fi
else
echo "Icon ${PATH}${THEME}/$i/places/start-here-kde.png dosn't exist or you don't have the write access to it!"
echo "I have nothing to do here"
echo
fi
done
 
echo "Placing new Icon"
echo
for i in "${RESOLUTION[@]}";
do
echo procesing ${PATH}${THEME}/$i/places/start-here-kde.svg
${CP} ${ICON} ${PATH}${THEME}/$i/places/start-here-kde.svg
done
echo "I'm Removing the downloaded icon"
${RM} -f ${ICON}
echo
echo "That's all!"
echo "To see the changes you need to change the icon set using KDE system settings"
echo
echo
echo "Placing new Icon"
echo
for i in "${RESOLUTION[@]}";
do
echo processing ${PATH}${THEME}/$i/places/start-here-kde.svg
if (${CP} ${ICON} ${PATH}${THEME}/$i/places/start-here-kde.svg) then
echo "Placing icon ${PATH}${THEME}/$i/places/start-here-kde.svg succsesfull"
echo
else
echo "There was error while placing icon ${PATH}${THEME}/$i/places/start-here-kde.svg"
echo
fi
done
echo "I'm Removing the downloaded icon"
${RM} -f ${ICON}
echo
echo "That's all!"
echo "To see the changes you need to change the icon set using KDE system settings"
echo
fi