Example #1
0
#!/bin/python
import os, sys
from libinstall import PackageInstaller, FileInstaller, run_verbose
dir = os.path.dirname(__file__)

PackageInstaller.try_install('wget')
PackageInstaller.try_install('curl')
if 'cygwin' in sys.platform:
    PackageInstaller.try_install('ssh')
else:
    PackageInstaller.try_install('openssh')

FileInstaller.create_symlink(os.path.join(dir, '.ssh'), '~/')

run_verbose(['chmod', '0600', os.path.expanduser('~/.ssh/config')])
Example #2
0
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller, run_verbose
dir = os.path.dirname(__file__)

PackageInstaller.try_install('rxvt-unicode-pixbuf')
PackageInstaller.try_install('xorg-fonts-misc')

FileInstaller.create_symlink(os.path.join(dir, 'rxvt-unicode'), '~/.Xresources.d/rxvt-unicode')
run_verbose(['xrdb', '-merge', os.path.expanduser('~/.Xresources.d/rxvt-unicode')])
Example #3
0
import os, glob
from libinstall import FileInstaller, PackageInstaller, run_verbose

dir = os.path.dirname(__file__)

PackageInstaller.try_install('xorg-font-utils')
PackageInstaller.try_install('ttf-dejavu')
PackageInstaller.try_install('ttf-symbola')
PackageInstaller.try_install('ttf-font-awesome')
PackageInstaller.try_install('ttf-ipa-mona')

if os.path.exists('/usr/share/fonts'):
    fonts_dir = os.path.expanduser('~/.local/share/fonts')

    FileInstaller.create_dir(fonts_dir)
    for font_path in glob.glob(os.path.join(dir, '*.ttf')):
        FileInstaller.create_symlink(font_path, fonts_dir + '/')

    if FileInstaller.has_executable('mkfontscale'):
        run_verbose(['mkfontscale', fonts_dir])
    if FileInstaller.has_executable('mkfontdir'):
        run_verbose(['mkfontdir', fonts_dir])
    if FileInstaller.has_executable('xset'):
        run_verbose(['xset', '+fp', fonts_dir])
        run_verbose(['xset', 'fp', 'rehash'])

if FileInstaller.has_executable('fc-cache'):
    FileInstaller.create_symlink(os.path.join(dir, 'fonts.conf'),
                                 '~/.config/fontconfig/')
    run_verbose(['fc-cache'])
Example #4
0
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller, run_verbose
dir = os.path.dirname(__file__)

PackageInstaller.try_install('xorg-server')
PackageInstaller.try_install('xorg-xinit')
PackageInstaller.try_install('xorg-xset')
PackageInstaller.try_install('xorg-xrdb')

FileInstaller.create_symlink(os.path.join(dir, 'xinitrc'), '~/.xinitrc')
FileInstaller.create_symlink(os.path.join(dir, 'Xresources'), '~/.Xresources')
FileInstaller.create_symlink(os.path.join(dir, 'imwheelrc'), '~/.imwheelrc')
run_verbose(['xrdb', '-merge', os.path.expanduser('~/.Xresources')])
Example #5
0
#!/bin/python3
from libinstall import run_verbose
import os, sys
dir = os.path.dirname(__file__)
shot_dir = os.path.join(dir, 'shot')

if not os.path.exists(shot_dir):
    os.chdir(dir)
    run_verbose(['git', 'clone', 'https://github.com/rr-/shot.git'])
else:
    os.chdir(shot_dir)
    run_verbose(['git', 'pull'])

os.chdir(shot_dir)
run_verbose([os.path.join(shot_dir, 'bootstrap')])
if 'cygwin' in sys.platform:
    run_verbose([os.path.join(shot_dir, 'waf'), 'configure', '--prefix='])
else:
    run_verbose([os.path.join(shot_dir, 'waf'), 'configure'])

run_verbose([os.path.join(shot_dir, 'waf'), 'install'])