Skip to content

Commit 8009b48

Browse files
Merge pull request #6 from CodeMaster7000/CodeMaster7000-patch-1
Create Check-ubuntu.sh
2 parents 50d9b77 + ffd1d12 commit 8009b48

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Check-ubuntu.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
os_type="$(lsb_release -si 2>/dev/null)"
3+
if [ "$os_type" != "Ubuntu" ] && [ "$os_type" != "Debian" ]; then
4+
echoerr "Only supports Ubuntu/Debian"
5+
exit 1
6+
fi
7+
if [ "$os_type" = "Ubuntu" ]; then
8+
os_ver="$(lsb_release -sr)"
9+
if [ "$os_ver" != "16.04" ] && [ "$os_ver" != "14.04" ] && [ "$os_ver" != "12.04" ]; then
10+
echoerr "Only supports Ubuntu 12.04/14.04/16.04"
11+
exit 1
12+
fi

0 commit comments

Comments
 (0)