A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
code simplification
[simgrid.git]
/
tools
/
tesh
/
tesh.pl
diff --git
a/tools/tesh/tesh.pl
b/tools/tesh/tesh.pl
index
54f053a
..
2e0ec34
100755
(executable)
--- a/
tools/tesh/tesh.pl
+++ b/
tools/tesh/tesh.pl
@@
-342,7
+342,7
@@
sub exec_cmd {
}
# substitute remaining variables, if any
}
# substitute remaining variables, if any
- while ( $cmd{'cmd'} =~ /\$
{(\w+)(?::[=-][^}]*)?
}/ ) {
+ while ( $cmd{'cmd'} =~ /\$
\{(\w+)(?::[=-][^}]*)?\
}/ ) {
$cmd{'cmd'} = var_subst( $cmd{'cmd'}, $1, "" );
}
while ( $cmd{'cmd'} =~ /\$(\w+)/ ) {
$cmd{'cmd'} = var_subst( $cmd{'cmd'}, $1, "" );
}
while ( $cmd{'cmd'} =~ /\$(\w+)/ ) {
@@
-730,11
+730,11
@@
sub build_diff {
sub var_subst {
my ( $text, $name, $value ) = @_;
if ($value) {
sub var_subst {
my ( $text, $name, $value ) = @_;
if ($value) {
- $text =~ s/\$
{$name(?::[=-][^}]*)?
}/$value/g;
+ $text =~ s/\$
\{$name(?::[=-][^}]*)?\
}/$value/g;
$text =~ s/\$$name(\W|$)/$value$1/g;
} else {
$text =~ s/\$$name(\W|$)/$value$1/g;
} else {
- $text =~ s/\$
{$name:=([^}]*)
}/$1/g;
- $text =~ s/\$
{$name
}//g;
+ $text =~ s/\$
\{$name:=([^}]*)\
}/$1/g;
+ $text =~ s/\$
\{$name\
}//g;
$text =~ s/\$$name(\W|$)/$1/g;
}
return $text;
$text =~ s/\$$name(\W|$)/$1/g;
}
return $text;