suppress Mercurial backup files;
uniform treatment of tool filtering in bash/perl/scala;
--- a/bin/isabelle Sat Mar 26 16:10:22 2011 +0100
+++ b/bin/isabelle Sat Mar 26 16:21:41 2011 +0100
@@ -55,7 +55,7 @@
do
TOOL="$DIR/$TOOLNAME"
case "$TOOL" in
- *~) ;;
+ *~ | *.orig) ;;
*) [ -f "$TOOL" -a -x "$TOOL" ] && exec "$TOOL" "$@" ;;
esac
done
--- a/lib/scripts/tools.pl Sat Mar 26 16:10:22 2011 +0100
+++ b/lib/scripts/tools.pl Sat Mar 26 16:21:41 2011 +0100
@@ -14,7 +14,7 @@
if (opendir DIR, $dir) {
for my $name (readdir DIR) {
my $file = "$dir/$name";
- if (-f $file and -x $file and !($file =~ /~$/)) {
+ if (-f $file and -x $file and !($file =~ /~$/ or $file =~ /\.orig$/)) {
if (open FILE, $file) {
my $description;
while (<FILE>) {
--- a/src/Pure/System/isabelle_system.scala Sat Mar 26 16:10:22 2011 +0100
+++ b/src/Pure/System/isabelle_system.scala Sat Mar 26 16:21:41 2011 +0100
@@ -290,7 +290,10 @@
{
getenv_strict("ISABELLE_TOOLS").split(":").find { dir =>
val file = platform_file(dir + "/" + name)
- try { file.isFile && file.canRead && file.canExecute }
+ try {
+ file.isFile && file.canRead && file.canExecute &&
+ !name.endsWith("~") && !name.endsWith(".orig")
+ }
catch { case _: SecurityException => false }
} match {
case Some(dir) =>