autogen.sh: Only copy submodules if building from a git branch.
`autogen.sh` fails if building from a standard source tarball. Firstly, git expects to be called in a git repository, then `copy_submodule_files` blindly attempts to copy files. Debian, Ubuntu, Linux Mint, and other derivatives all run `autogen.sh` before compiling to regenerate build files. This patch ensures that various git commands are only called and 'dlg' files are only copied if `autogen.sh` is called from a git repository.
This commit is contained in:
parent
bbab0a675e
commit
467e49e817
22
autogen.sh
22
autogen.sh
|
@ -182,17 +182,19 @@ copy_submodule_files ()
|
||||||
cp $DLG_SRC_DIR/* src/dlg
|
cp $DLG_SRC_DIR/* src/dlg
|
||||||
}
|
}
|
||||||
|
|
||||||
DLG_INC_DIR=subprojects/dlg/include/dlg
|
if test -d ".git"; then
|
||||||
DLG_SRC_DIR=subprojects/dlg/src/dlg
|
DLG_INC_DIR=subprojects/dlg/include/dlg
|
||||||
|
DLG_SRC_DIR=subprojects/dlg/src/dlg
|
||||||
|
|
||||||
if test -d "$DLG_INC_DIR"; then
|
if test -d "$DLG_INC_DIR"; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
echo "Checking out submodule in \`subprojects/dlg':"
|
echo "Checking out submodule in \`subprojects/dlg':"
|
||||||
git submodule init
|
git submodule init
|
||||||
git submodule update
|
git submodule update
|
||||||
|
fi
|
||||||
|
|
||||||
|
copy_submodule_files
|
||||||
fi
|
fi
|
||||||
|
|
||||||
copy_submodule_files
|
|
||||||
|
|
||||||
# EOF
|
# EOF
|
||||||
|
|
Loading…
Reference in New Issue