Source

filesnake / scripts / install_desk.py

Full commit
# Script to install desktop files and icons
import sys, optparse
import os,shutil

def install_icon(name, size):
    dest = os.path.join(prefix, "share/icons/hicolor", size, name)
    shutil.copy(
        os.path.join("icon", size, name),
        dest)
    print "Installed",dest

parser = optparse.OptionParser()
parser.add_option("--prefix", default=sys.exec_prefix)

options,args = parser.parse_args()
prefix = options.prefix

print "Installing desktop files"
res = os.system("desktop-file-install filesnake.desktop")

if res != 0:
    print "Error"
    sys.exit(res)

print "Installing icons"
install_icon("filesnake.png", "48x48")
install_icon("filesnake.png", "16x16")
install_icon("filesnake.svg", "scalable")