forked from isc-projects/forge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchsut.sh
More file actions
executable file
·24 lines (21 loc) · 823 Bytes
/
Copy pathchsut.sh
File metadata and controls
executable file
·24 lines (21 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
#Author: Maciek Fijalkowski
script_path=$(cd "$(dirname "${0}")" && pwd)
if [ "$1" == --help -o "$1" == -h ]; then
printf "This is a help message. This script can change SOFTWARE_UNDER_TEST
variable. You may find it useful while running specific test case
for various client/server implementations.\n
Usage: ./chsut
-------- prints current SOFTWARE_UNDER_TEST variable
./chsut arg
-------- changes SOFTWARE_UNDER_TEST to arg
./chsut -h
-------- prints this message.\n\n"
elif [ $# -eq 0 ]; then
grep "^SOFTWARE_UNDER_TEST*" "${script_path}/init_all.py"
else
printf "Changing SOFTWARE_UNDER_TEST variable to %s...\n" $1
sed -i "s/^SOFTWARE_UNDER_TEST = .*,/SOFTWARE_UNDER_TEST = ('${1}'),/" \
"${script_path}/init_all.py"
printf "Done.\n"
fi