diff options
author | James Dominic P. Guana <guana.histark@gmail.com> | 2021-04-10 18:20:21 +0800 |
---|---|---|
committer | Robert Roth <robert.roth.off@gmail.com> | 2021-04-23 09:48:11 +0000 |
commit | 2ec1815e6ce8da65244c18fbad56c06721f737cb (patch) | |
tree | ebceef606186b5c901c9b4a8edf8fb226c074a96 /autogen.sh | |
parent | 48595809ed33c216a05a7fb0b0ac73dcd4635624 (diff) | |
download | libgtop-2ec1815e6ce8da65244c18fbad56c06721f737cb.tar.gz |
Revert "Revert "Code clean up and add example""
This reverts commit ea08151ae6582a438db76b738293a0194c964b88.
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -1,5 +1,33 @@ #!/bin/sh # Run this to generate all the initial makefiles, etc. +RED='\033[0;31m' +NC='\033[0m' # No Color + +case "$(uname -s)" in + Linux) + if ! [ -x "$(command -v lsblk)" ]; then + echo '' >&2 + echo -e "${RED}*** ERROR:${NC} lsblk cannot be found. Try installing util-linux or util-linux-ng ${RED}***${NC}" >&2 + echo '' >&2 + exit 1 + fi + if ! [ -x "$(command -v sed)" ]; then + echo '' >&2 + echo -e "${RED}*** ERROR:${NC} sed cannot be found. ***" >&2 + echo '' >&2 + exit 1 + fi + if ! [ -x "$(command -v tr)" ]; then + echo '' >&2 + echo -e "${RED}*** ERROR:${NC} tr cannot be found. ***" >&2 + echo '' >&2 + exit 1 + fi + ;; + *) + ;; +esac + test -n "$srcdir" || srcdir=$(dirname "$0") test -n "$srcdir" || srcdir=. |