Skip to content

Commit 7bbef78

Browse files
ladisginkorifey
authored andcommitted
Add warning if run on unsupported os version
1 parent c4d9028 commit 7bbef78

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docker/release_distribution_scripts/utbot_run_system.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@
77
# This script can launch server, cli and tests
88
#arguments - add MODE (server | cli | test)
99

10+
# Check os version
11+
os_tag=$(lsb_release -i | cut -f2)
12+
os_version=$(lsb_release -r | cut -f2)
13+
major_os_version=${os_version%%.*}
14+
15+
if [ "$os_tag" != "Ubuntu" ] || [ "$major_os_version" -lt "18" ]
16+
then
17+
echo "warning: $(lsb_release -d | cut -f2) unsupported system"
18+
echo "UTBotCPP support ubuntu 18.04 and above"
19+
read -r -p "Are want to continue? [y/N] " response
20+
if ! [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]
21+
then
22+
exit 0;
23+
fi
24+
fi
25+
1026
# Check if arguments are correct
1127
if [ "$1" != "cli" ] && [ "$1" != "server" ] && [ "$1" != "test" ]
1228
then

0 commit comments

Comments
 (0)