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
Fix portability issues in shellscripts (codefactor.io/ShellCheck).
[simgrid.git]
/
examples
/
smpi
/
replay_multiple
/
generate_multiple_deployment.sh
diff --git
a/examples/smpi/replay_multiple/generate_multiple_deployment.sh
b/examples/smpi/replay_multiple/generate_multiple_deployment.sh
index
3cf7463
..
62a3fa3
100755
(executable)
--- a/
examples/smpi/replay_multiple/generate_multiple_deployment.sh
+++ b/
examples/smpi/replay_multiple/generate_multiple_deployment.sh
@@
-124,7
+124,7
@@
DESCRIPTIONFILE=$(echo $PROC_ARGS|cut -d' ' -f1)
if [ -n "${DESCRIPTIONFILE}" ] && [ -f "${DESCRIPTIONFILE}" ]; then
IFS_OLD=$IFS
if [ -n "${DESCRIPTIONFILE}" ] && [ -f "${DESCRIPTIONFILE}" ]; then
IFS_OLD=$IFS
- IFS=$
'\n'
+ IFS=$
(printf '\n_'); IFS=${IFS%_} # protect trailing \n
set -f
NUMPROCS=0
while IFS= read -r line; do
set -f
NUMPROCS=0
while IFS= read -r line; do
@@
-149,7
+149,7
@@
if [ -n "${DESCRIPTIONFILE}" ] && [ -f "${DESCRIPTIONFILE}" ]; then
SEQ1=$( ${HAVE_SEQ} 0 $(( NUMPROCSMINE - 1 )) )
else
cnt=0
SEQ1=$( ${HAVE_SEQ} 0 $(( NUMPROCSMINE - 1 )) )
else
cnt=0
- while
(( cnt < NUMPROCSMINE ))
; do
+ while
[ $(( cnt < NUMPROCSMINE )) -ne 0 ]
; do
SEQ1="$SEQ1 $cnt"
cnt=$((cnt + 1))
done
SEQ1="$SEQ1 $cnt"
cnt=$((cnt + 1))
done
@@
-186,7
+186,7
@@
if [ -n "${DESCRIPTIONFILE}" ] && [ -f "${DESCRIPTIONFILE}" ]; then
done
# return IFS back to newline for "for" loop
IFS_OLD=$IFS
done
# return IFS back to newline for "for" loop
IFS_OLD=$IFS
- IFS=$
'\n'
+ IFS=$
(printf '\n_'); IFS=${IFS%_} # protect trailing \n
done < ${DESCRIPTIONFILE}
# return delimiter to previous value
done < ${DESCRIPTIONFILE}
# return delimiter to previous value