Run git submodule commands in setup script
This commit is contained in:
parent
d68e711e5a
commit
a4db02673c
10
setup
10
setup
|
@ -14,6 +14,7 @@ import os
|
||||||
import os.path
|
import os.path
|
||||||
import shutil
|
import shutil
|
||||||
import re
|
import re
|
||||||
|
import subprocess
|
||||||
|
|
||||||
# Install? (deletes existing files in $HOME).
|
# Install? (deletes existing files in $HOME).
|
||||||
install = "--install" in sys.argv
|
install = "--install" in sys.argv
|
||||||
|
@ -29,6 +30,15 @@ print("")
|
||||||
if install:
|
if install:
|
||||||
print("* Install mode: will delete files in $HOME and set up symlinks!")
|
print("* Install mode: will delete files in $HOME and set up symlinks!")
|
||||||
|
|
||||||
|
# Set up the submodules first.
|
||||||
|
print("Initializing git submodules...")
|
||||||
|
os.chdir(basedir)
|
||||||
|
subprocess.call(["git", "submodule", "init"])
|
||||||
|
subprocess.call(["git", "submodule", "update"])
|
||||||
|
os.chdir(homedir)
|
||||||
|
print("Submodules updated!")
|
||||||
|
print("")
|
||||||
|
|
||||||
def crawl(folder):
|
def crawl(folder):
|
||||||
"""Recursively crawl a folder. Directories will be created relative to
|
"""Recursively crawl a folder. Directories will be created relative to
|
||||||
$HOME, and files in those directories will be symlinked."""
|
$HOME, and files in those directories will be symlinked."""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user