source: air-manager/trunk/fuentes/air-helper/src/air-helper-installer.py @ 7331

Last change on this file since 7331 was 7331, checked in by Juanma, 2 years ago

initial release

  • Property svn:executable set to *
File size: 730 bytes
Line 
1#!/usr/bin/env python3
2import  airmanager.airmanager as installer
3import sys
4import subprocess
5
6installer=installer.AirManager()
7err=0
8dbg=False
9
10def _debug(msg):
11        if dbg:
12                print("Helper: %s"%msg)
13#def _debug
14
15if sys.argv[1]=='install':
16        _debug("Installing %s %s"%(sys.argv[2],sys.argv[3]))
17        err=installer.install(sys.argv[2],sys.argv[3])
18        try:
19                subprocess.check_call(['gtk-update-icon-cache','/usr/share/icons/hicolor/'])
20        except:
21                err=1
22elif sys.argv[1]=='remove':
23        _debug("Removing %s %s"%(sys.argv[2],sys.argv[3]))
24        air_pkg={'desktop':sys.argv[3],'air_id':sys.argv[2]}
25        err=installer.remove_air_app(air_pkg)
26        try:
27                subprocess.check_call(['gtk-update-icon-cache','/usr/share/icons/hicolor/'])
28        except:
29                err=1
30
31exit (err)
32
Note: See TracBrowser for help on using the repository browser.