Skip to content

Commit 3e0b200

Browse files
committed
Make epos.sh compatible to /bin/sh
1 parent 0cdcff3 commit 3e0b200

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

MC/config/examples/epos4/epos.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
#!/bin/bash
1+
#!/bin/sh
22
# Script based on CRMC example
33
# EPOS4 option files must contain ihepmc set to 2 to print HepMC
44
# data on stdout. -hepmc flag is not needed anymore, but -hepstd is fundamental
55
# in order not to print useless information on stdout (a z-*optns*.mtr file will be created)
66

77
optns="example"
8-
seed=$RANDOM
8+
seed=$(od -An -N2 -tu2 /dev/urandom | tr -d ' ')
99
EPOS4=""
1010

1111
if [ -z "$EPO4VSN" ]; then
@@ -62,7 +62,7 @@ fi
6262

6363
if [ $seed -eq 0 ]; then
6464
# Seed can't be 0, random number will be used
65-
seed=$RANDOM
65+
seed=$(od -An -N2 -tu2 /dev/urandom | tr -d ' ')
6666
fi
6767

6868
# OR filters the stdout with only HepMC useful data

0 commit comments

Comments
 (0)