#include "tex_helpers.h"
#include "debug.h"
+#include "gettext.h"
+
+#include "frontends/Alert.h"
#include "support/filetools.h"
#include "support/lstrings.h"
namespace lyx {
+using support::bformat;
using support::contains;
using support::getExtension;
using support::getFileContents;
namespace frontend {
-// build filelists of all availabe bst/cls/sty-files. done through
-// kpsewhich and an external script, saved in *Files.lst
void rescanTexStyles()
{
// Run rescan in user lyx directory
Path p(package().user_support());
+ string const command = libFileSearch("scripts", "TeXFiles.py");
Systemcall one;
- one.startscript(Systemcall::Wait,
+ int const status = one.startscript(Systemcall::Wait,
lyx::support::os::python() + ' ' +
- quoteName(libFileSearch("scripts", "TeXFiles.py")));
+ quoteName(command));
+ if (status == 0)
+ return;
+ Alert::error(_("Could not update TeX information"),
+ bformat(_("The script `%s' failed."), command));
}
namespace lyx {
namespace frontend {
-// build filelists of all availabe bst/cls/sty-files. done through
-// kpsewhich and an external script, saved in *Files.lst
+/** Build filelists of all availabe bst/cls/sty-files. Done through
+ * kpsewhich and an external script, saved in *Files.lst.
+ */
void rescanTexStyles();
/// rebuild the textree