I have two files with different names. I have a for-loop to see if one file is there; if it is then it will change a file.
My first thought was to make a list of all the files and what its counterpart is. That would not look nice and I can't cover all possibilities in the script. If this is the only way, how would I do it best?
The script will find if a program has an icon on the desktop. If it has then my script will change the size of that with ImageMagick. My problem is that the name of the program not always is the same as the icon-file. So I am not sure what the best action would be...
I need the "rtcom-call-ui.desktop" to be paired with "general_call.png" so it can be found with my script. The script can't find "general_call.png" cause it is looking for "rtcom-call-ui.png".
for applet in $appletDir*
do
app=`basename $applet | sed -e 's/.*://g' -e 's/.*osso-//g' -e 's/\.desktop.*//g'`
find=`find $icoDir64 $icoDirSca | grep .png`
for file in $find
do
base="`basename ${file}`"
if [ "${base}" = "${app}.png" -o "${base}" = "tasklaunch_${app}.png" -o "${base}" = "general_${app}.png" ]; then
echo "WORKING!!!!!!!!!!!!!!!!!! $file"
fi
done
done