summaryrefslogtreecommitdiffstats
path: root/.local/bin/tmp_os.sh
blob: ad0be7f2f6b18accebceb21d84604127ab74078b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

tmpfile=/tmp/os
os="$(uname)"

if [ "$os" = "Linux" ]; then
	grep "Artix" /etc/issue >/dev/null 2>&1 && os=1 || os=2
elif [ "$os" = "FreeBSD" ]; then
	os=3
else
	echo "unknown OS"
	exit 1
fi
echo -n $os >$tmpfile