1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
dotfile-automator/project/export/exports.py

42 lines
945 B
Python
Raw Normal View History

import os, shutil
2015-12-06 22:30:57 +00:00
from yaml import load
from project.utils import shell, constants
try:
2015-12-06 22:30:57 +00:00
from yaml import CLoader as Loader
except ImportError:
2015-12-06 22:30:57 +00:00
from yaml import Loader
2015-12-05 23:25:26 +00:00
def atom():
out, error = shell.call('which apm')
if not out or error:
print("You don't seem to have atom installed.")
return True
os.chdir('atom')
packages_themes = []
with open('packages.yml') as pt_file:
packages_themes = load(pt_file, Loader=Loader) or {}
for package in packages_themes:
exit_code = os.system('apm install {}'.format(package))
if exit_code != 0:
print("Error installing {}".format(package), exit_code)
return True
shutil.copy2(
os.path.join(constants.PUBLIC_DATA_DIR, 'atom', 'keymap.cson'),
os.path.expanduser("~/.atom/keymap.cson")
)
2015-12-05 23:25:26 +00:00
def thing():
print("thing")
def stuff():
print("stuff")
def foo():
print("foo")