diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index feec360..91d2d4b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -13,7 +13,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ubuntu-20.04, ubuntu-22.04]
+ os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
fail-fast: false
steps:
- uses: actions/checkout@v4
@@ -25,16 +25,45 @@ jobs:
bash -e -o pipefail -- typeinfo.sh
CXX=clang++ bash -e -o pipefail -- typeinfo.sh
- name: ShellCheck
- run: bash -c 'shopt -s globstar; shellcheck -o avoid-nullary-conditions,check-extra-masked-returns,check-set-e-suppressed,deprecate-which,quote-safe-variables,require-double-brackets -s bash **/*.sh'
+ run: shopt -s globstar; shellcheck -o avoid-nullary-conditions,check-extra-masked-returns,check-set-e-suppressed,deprecate-which,quote-safe-variables,require-double-brackets -s bash **/*.sh
continue-on-error: true
+ Linux-Container:
+ name: Linux Container
+
+ runs-on: ubuntu-latest
+ container: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: ["ubuntu:14.04", "ubuntu:16.04", "ubuntu:18.04", "ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04"]
+ fail-fast: false
+ steps:
+ # - uses: actions/checkout@v4
+ - name: Install
+ run: |
+ apt-get update
+ apt-get install -y wget build-essential clang
+ g++ --version
+ clang++ --version
+ - name: Download
+ run: |
+ wget "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/archive/$GITHUB_SHA.tar.gz"
+ tar -xzvf "$GITHUB_SHA.tar.gz" --strip-components=1
+ - name: Script
+ run: |
+ set -x
+ bash -o pipefail -- info.sh
+ # bash -e -o pipefail -- ipinfo.sh
+ bash -e -o pipefail -- typeinfo.sh
+ CXX=clang++ bash -e -o pipefail -- typeinfo.sh || true
+
macOS:
name: macOS Datatype Information
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [macos-13, macos-14]
+ os: [macos-13, macos-latest]
fail-fast: false
steps:
- uses: actions/checkout@v4
diff --git a/README.md b/README.md
index 4aad0fd..ee6f41a 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ Simple script to quickly output system information on Linux, including:
RAM, swap and disk space is output in both MiB (10242 bytes) and MB (10002 bytes). Similar to the [`systeminfo`](https://en.wikipedia.org/wiki/Systeminfo.exe) command on Windows.
-Requires Bash 4+. Compared to similar programs, this script outputs much more information and is smaller. Useful when using an unfamiliar system or VM, particularly before running a program that has specific system requirements. All the values are saved to variables, which makes this easy to [incorporate](#scripts-where-this-is-incorporated) into larger scripts.
+Requires at least Bash 4+. Compared to similar programs, this script outputs much more information and is smaller. Useful when using an unfamiliar system or VM, particularly before running a program that has specific system requirements. All the values are saved to variables, which makes this easy to [incorporate](#scripts-where-this-is-incorporated) into larger scripts.
For your Public IP addresses, please see [Public IP addresses](#public-ip-addresses) below.
@@ -84,7 +84,7 @@ curl https://raw.github.com/tdulcet/Linux-System-Information/master/info.sh | ba
### Datatype Information
-Outputs C/C++ datatype information, including datatype sizes, minimum values, maximum values, etc. for the current system. Requires C++17.
+Outputs C/C++ datatype information, including datatype sizes, minimum values, maximum values, etc. for the current system. Requires C++11. Supports both Linux and macOS.
```bash
wget https://raw.github.com/tdulcet/Linux-System-Information/master/typeinfo.sh -qO - | bash -s
diff --git a/ipinfo.sh b/ipinfo.sh
index 872b21b..8ee9b2d 100644
--- a/ipinfo.sh
+++ b/ipinfo.sh
@@ -15,11 +15,11 @@ fi
urls=(
alma.ch/myip.cgi
api.ipify.org/
- bot.whatismyipaddress.com/
+ # bot.whatismyipaddress.com/
canhazip.com/
checkip.amazonaws.com/
curlmyip.net/
- diagnostic.opendns.com/myip
+ # diagnostic.opendns.com/myip
echoip.de/
eth0.me/
icanhazip.com/
@@ -33,8 +33,8 @@ urls=(
ipinfo.io/ip
ip.tyk.nu/
l2.io/ip
- myip.addr.space/
- tnx.nl/ip
+ # myip.addr.space/
+ # tnx.nl/ip
wgetip.com/
ifconfig.io/ip
# gso.cs.pdx.edu/ip/
diff --git a/typeinfo.sh b/typeinfo.sh
index 203dcc1..0dbfb08 100644
--- a/typeinfo.sh
+++ b/typeinfo.sh
@@ -172,9 +172,9 @@ int main()
cout << "\n\n";
cout << "Data Type\t\tDecimal digits\tMaximum Decimal digits\tMantissa bits\tMaximum integer\n\n";
- cout << "float:\t\t\t" << FLT_DIG << "\t\t" << FLT_DECIMAL_DIG << "\t\t\t" << FLT_MANT_DIG << "\t\t" << floattostring(maxint()) << '\n';
- cout << "double:\t\t\t" << DBL_DIG << "\t\t" << DBL_DECIMAL_DIG << "\t\t\t" << DBL_MANT_DIG << "\t\t" << floattostring(maxint()) << '\n';
- cout << "long double:\t\t" << LDBL_DIG << "\t\t" << LDBL_DECIMAL_DIG << "\t\t\t" << LDBL_MANT_DIG << "\t\t" << floattostring(maxint()) << '\n';
+ cout << "float:\t\t\t" << FLT_DIG << "\t\t" << /* FLT_DECIMAL_DIG */ numeric_limits::max_digits10 << "\t\t\t" << FLT_MANT_DIG << "\t\t" << floattostring(maxint()) << '\n';
+ cout << "double:\t\t\t" << DBL_DIG << "\t\t" << /* DBL_DECIMAL_DIG */ numeric_limits::max_digits10 << "\t\t\t" << DBL_MANT_DIG << "\t\t" << floattostring(maxint()) << '\n';
+ cout << "long double:\t\t" << LDBL_DIG << "\t\t" << /* LDBL_DECIMAL_DIG */ numeric_limits::max_digits10 << "\t\t\t" << LDBL_MANT_DIG << "\t\t" << floattostring(maxint()) << '\n';
cout << '\n';
return 0;
@@ -182,5 +182,5 @@ int main()
EOF
trap 'rm /tmp/types{.cpp,}' EXIT
-"$CXX" -std=gnu++17 -Wall -g -O3 /tmp/types.cpp -o /tmp/types
+"$CXX" -std=gnu++11 -Wall -g -O3 /tmp/types.cpp -o /tmp/types
/tmp/types