actions.py 720 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from pisi.actionsapi import shelltools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import get
  9. import os
  10. WorkDir = "fgdata"
  11. NoStrip = "/"
  12. def fixperms(d):
  13. for root, dirs, files in os.walk(d):
  14. for name in dirs:
  15. shelltools.chmod(os.path.join(root, name), 0755)
  16. for name in files:
  17. shelltools.chmod(os.path.join(root, name), 0644)
  18. def install():
  19. pisitools.dodir("/usr/share")
  20. shelltools.cd("..")
  21. fixperms(WorkDir)
  22. shelltools.copytree(WorkDir, "%s/usr/share/flightgear" % get.installDIR())