-#! /bin/sh
+#!/usr/bin/env sh
-# Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.
+# Copyright (c) 2007-2020. The SimGrid Team. All rights reserved.
# This program is free software; you can redistribute it and/or modify it
# under the terms of the license (GNU LGPL) which comes with this package.
cat > ${APPLICATIONTMP} <<APPLICATIONHEAD
<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
+<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
<platform version="4.1">
APPLICATIONHEAD
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
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
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