Move scripts to library/scripts

git can't cope with replacing scripts/3rdparty/* submodules with a single
scripts submodule.
develop
lethosor 2016-06-15 18:43:13 -04:00
parent 9de4550fde
commit 27a84a8246
7 changed files with 12 additions and 13 deletions

4
.gitmodules vendored

@ -10,6 +10,6 @@
[submodule "depends/clsocket"] [submodule "depends/clsocket"]
path = depends/clsocket path = depends/clsocket
url = git://github.com/DFHack/clsocket.git url = git://github.com/DFHack/clsocket.git
[submodule "scripts"] [submodule "library/scripts"]
path = scripts path = library/scripts
url = git://github.com/dfhack/scripts.git url = git://github.com/dfhack/scripts.git

@ -36,7 +36,7 @@ script:
- python travis/authors-rst.py - python travis/authors-rst.py
- python travis/script-in-readme.py - python travis/script-in-readme.py
- python travis/script-syntax.py --ext=lua --cmd="luac5.2 -p" - python travis/script-syntax.py --ext=lua --cmd="luac5.2 -p"
- python travis/script-syntax.py --ext=rb --cmd="ruby -c" --path scripts/ - python travis/script-syntax.py --ext=rb --cmd="ruby -c" --path library/scripts/
- mkdir build-travis - mkdir build-travis
- cd build-travis - cd build-travis
- cmake .. -DCMAKE_C_COMPILER=gcc-$GCC_VERSION -DCMAKE_CXX_COMPILER=g++-$GCC_VERSION -DBUILD_DOCS:BOOL=ON - cmake .. -DCMAKE_C_COMPILER=gcc-$GCC_VERSION -DCMAKE_CXX_COMPILER=g++-$GCC_VERSION -DBUILD_DOCS:BOOL=ON

@ -210,8 +210,6 @@ IF(BUILD_PLUGINS)
add_subdirectory (plugins) add_subdirectory (plugins)
endif() endif()
add_subdirectory(scripts)
find_package(Sphinx QUIET) find_package(Sphinx QUIET)
if (BUILD_DOCS) if (BUILD_DOCS)
if (NOT SPHINX_FOUND) if (NOT SPHINX_FOUND)
@ -223,12 +221,12 @@ if (BUILD_DOCS)
"${CMAKE_CURRENT_SOURCE_DIR}/docs/images/*.png" "${CMAKE_CURRENT_SOURCE_DIR}/docs/images/*.png"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/styles/*" "${CMAKE_CURRENT_SOURCE_DIR}/docs/styles/*"
"${CMAKE_CURRENT_SOURCE_DIR}/conf.py" "${CMAKE_CURRENT_SOURCE_DIR}/conf.py"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/about.txt" "${CMAKE_CURRENT_SOURCE_DIR}/library/scripts/about.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/*/about.txt" "${CMAKE_CURRENT_SOURCE_DIR}/library/scripts/*/about.txt"
) )
file(GLOB_RECURSE SPHINX_SCRIPT_DEPS file(GLOB_RECURSE SPHINX_SCRIPT_DEPS
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/*.lua" "${CMAKE_CURRENT_SOURCE_DIR}/library/scripts/*.lua"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/*.rb" "${CMAKE_CURRENT_SOURCE_DIR}/library/scripts/*.rb"
) )
set(SPHINX_DEPS ${SPHINX_DEPS} ${SPHINX_SCRIPT_DEPS} set(SPHINX_DEPS ${SPHINX_DEPS} ${SPHINX_SCRIPT_DEPS}
"${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.rst" "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.rst"

@ -52,7 +52,7 @@ def document_scripts():
""" """
# First, we collect the commands and paths to include in our docs # First, we collect the commands and paths to include in our docs
scripts = [] scripts = []
for root, _, files in os.walk('scripts'): for root, _, files in os.walk('library/scripts'):
scripts.extend(doc_dir(root, files)) scripts.extend(doc_dir(root, files))
# Next we split by type and create include directives sorted by command # Next we split by type and create include directives sorted by command
kinds = {'base': [], 'devel': [], 'fix': [], 'gui': [], 'modtools': []} kinds = {'base': [], 'devel': [], 'fix': [], 'gui': [], 'modtools': []}
@ -84,7 +84,7 @@ def write_script_docs():
'modtools': 'Scripts for Modders'} 'modtools': 'Scripts for Modders'}
for k in head: for k in head:
title = ('.. _{k}:\n\n{l}\n{t}\n{l}\n\n' title = ('.. _{k}:\n\n{l}\n{t}\n{l}\n\n'
'.. include:: /scripts/{a}about.txt\n\n' '.. include:: /library/scripts/{a}about.txt\n\n'
'.. contents::\n\n').format( '.. contents::\n\n').format(
k=k, t=head[k], k=k, t=head[k],
l=len(head[k])*'#', l=len(head[k])*'#',
@ -179,7 +179,6 @@ exclude_patterns = [
'README.md', 'README.md',
'docs/html*', 'docs/html*',
'depends/*', 'depends/*',
'scripts/3rdparty/*',
'build*', 'build*',
] ]

@ -434,3 +434,5 @@ if(BUILD_DEVEL)
add_subdirectory (doc) add_subdirectory (doc)
ENDIF() ENDIF()
endif() endif()
add_subdirectory(scripts)

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

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