source: research/2008-displacement/study-4.sh @ 4838

Last change on this file since 4838 was 2286, checked in by Sam Hocevar, 12 years ago
  • More scripts for part 3.
  • Implemented main.c as a seccomp bytecode for CPUShare.
  • Property svn:executable set to *
File size: 573 bytes
Line 
1#!/bin/sh
2
3set -e
4
5if [ ! -x ./main ]; then
6    make main
7fi
8
9if [ "$1" = "" ]; then
10    echo "Usage: $0 <directory>"
11    exit 1
12fi
13
14if [ ! -d "$1" ]; then
15    echo "$0: $1 is not a directory"
16    exit 1
17fi
18
19find $1 -type f | while read i; do
20    OUTPUT="$(echo "$i" | tr -d / | sed 's/^[.]*//').txt"
21    echo "$0: outputting to $OUTPUT"
22
23    if [ -f "$OUTPUT" ]; then
24        echo "$0: file already exists, skipping"
25        continue
26    fi
27
28    touch "$OUTPUT"
29    ./main -4 "$i" | tee -a "$OUTPUT" | while read line; do
30        echo -n .
31    done
32    echo "done."
33done
34
Note: See TracBrowser for help on using the repository browser.