-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed executioner metadata reading + altered run to generate the input
- Loading branch information
1 parent
fe8ed4f
commit 1b2cb3d
Showing
3 changed files
with
30 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
function confirm | ||
{ | ||
if [ -e "$1" ] | ||
then | ||
read -p "Are you sure you want to overwrite \"$1\": " answer | ||
if [[ "$answer" != [yY] ]] && [[ "$answer" != [yY][eE][sS] ]] | ||
then | ||
exit 1 | ||
fi | ||
fi | ||
} | ||
|
||
if [ "$#" -lt 3 ] | ||
then | ||
echo "Usage: $(basename "$0") <WORKLOAD> <OUT> <RELATIONS>" | ||
exit 1 | ||
fi | ||
|
||
queries=$(cat "$1"); shift | ||
|
||
out="$1"; shift | ||
|
||
relations=$(for file in "$*"; do echo "$(realpath $file)"; done | rev | sort -n -k1.2 | rev) | ||
|
||
input=$(echo -e "$relations\nDone\n$queries") | ||
|
||
confirm "$out"; echo "$input" > "$out" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters