Skip to content

Commit

Permalink
ADded run_example script
Browse files Browse the repository at this point in the history
  • Loading branch information
galatolofederico committed Sep 16, 2021
1 parent d122686 commit 26c32c8
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions run_example.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/sh

usage(){
echo "Usage: $0 <example-name>"
echo "Available exaples are:"
ls ./examples
exit 1
}


if [ "$#" -ne 1 ]; then
usage;
fi

if [ ! -d "./examples/$1" ]; then
usage;
fi

name=$(openssl rand -hex 16)

cd ./examples/"$1" || exit
easyopt create "$name"
easyopt agent "$name"

0 comments on commit 26c32c8

Please sign in to comment.