pre_marking1/mk
author Christian Urban <christian.urban@kcl.ac.uk>
Mon, 03 Jan 2022 00:59:32 +0000
changeset 419 d8dbf91c149b
parent 382 1bd800376e0c
permissions -rwxr-xr-x
updated test with second arguments
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
382
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 376
diff changeset
     1
#!/bin/bash
1bd800376e0c updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 376
diff changeset
     2
set -euo pipefail
373
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     3
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     4
trap "exit" INT
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     5
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     6
files=${1:-*/pre1}
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     7
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     8
for sd in $files; do
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     9
  cd $sd
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    10
  echo $sd
376
6cc36d0ef79e updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 374
diff changeset
    11
  sleep 5
373
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    12
  touch .
374
90b267768329 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 373
diff changeset
    13
  cp ../../../../../pre_marking1/collatz_test.sh .
90b267768329 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 373
diff changeset
    14
  cp ../../../../../pre_marking1/collatz_test1.scala .
90b267768329 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 373
diff changeset
    15
  cp ../../../../../pre_marking1/collatz_test2.scala .
90b267768329 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 373
diff changeset
    16
  cp ../../../../../pre_marking1/collatz_test3.scala .
90b267768329 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 373
diff changeset
    17
  ./collatz_test.sh output
373
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    18
  rm collatz_test.sh
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    19
  rm collatz_test1.scala
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    20
  rm collatz_test2.scala
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    21
  rm collatz_test3.scala
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    22
  cd ..
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    23
  cd ..
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    24
done
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    25
d29cd5883c7b updated
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    26