Add raw directory for submodules, and add ALE

This commit is contained in:
Adam Gausmann 2019-04-13 01:53:21 -05:00
parent 25b8eacff3
commit 0fa3e363b1
3 changed files with 17 additions and 0 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "raw/.vim/pack/git-plugins/start/ale"]
path = raw/.vim/pack/git-plugins/start/ale
url = https://github.com/w0rp/ale.git

View file

@ -2,6 +2,7 @@
import argparse import argparse
import os import os
import shutil
import socket import socket
import sys import sys
from pathlib import Path from pathlib import Path
@ -36,6 +37,7 @@ def main():
) )
args = parser.parse_args() args = parser.parse_args()
raw_dir = args.dotfiles / 'raw'
templates_dir = args.dotfiles / 'templates' templates_dir = args.dotfiles / 'templates'
include_dir = args.dotfiles / 'include' include_dir = args.dotfiles / 'include'
host_filename = args.dotfiles / 'hosts' / '{}.toml'.format(args.hostname) host_filename = args.dotfiles / 'hosts' / '{}.toml'.format(args.hostname)
@ -53,9 +55,20 @@ def main():
], ],
) )
for raw_path in raw_dir.glob('**/*'):
if not raw_path.is_file():
continue
rel_path = raw_path.relative_to(raw_dir)
output_path = args.home / rel_path
print(rel_path)
output_path.parent.mkdir(parents=True, exist_ok=True)
shutil.copy(raw_path, output_path)
for template_path in templates_dir.glob('**/*'): for template_path in templates_dir.glob('**/*'):
if not template_path.is_file(): if not template_path.is_file():
continue continue
rel_path = template_path.relative_to(templates_dir)
print(rel_path)
template = mako.template.Template( template = mako.template.Template(
filename=str(template_path), filename=str(template_path),
strict_undefined=True, strict_undefined=True,

@ -0,0 +1 @@
Subproject commit d7395906ba0f9aca2fb1a6c32df236bfd4ab32f6