Skip to content

Commit 90f423d

Browse files
committed
Using lsb_release to determine the distribution. It usually comes with
every new Linux distribution, but it has to be installed. First check is if it is present and if not, aborts with a message. If present, presents the user with a list of strings that can later be manipulated.
1 parent e463b98 commit 90f423d

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
LSB=$( which lsb_release )
4+
5+
if [[ ! ${LSB} ]]; then
6+
7+
echo "LSB is not installed. Unable to determine your distribution."
8+
exit
9+
10+
else
11+
12+
${LSB} -a | grep -v LSB
13+
14+
fi

0 commit comments

Comments
 (0)