diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2019-09-25 08:53:47 +0300 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2019-09-25 08:53:47 +0300 |
| commit | 4488314f7894e0008601b7e0a047eb9187b0760e (patch) | |
| tree | c474d63372803a966c9694a1e6477f67f464a0c4 | |
| parent | 0a4a100eb370241b0de95f9f8774961f15df380d (diff) | |
| download | pfetch-4488314f7894e0008601b7e0a047eb9187b0760e.tar.gz | |
pfetch: fix bash 3.2 error
| -rwxr-xr-x | pfetch | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -223,7 +223,16 @@ get_pkgs() { # The output from this is then piped to 'wc -l' to count each # line, giving us the total package count of whatever package # managers are installed. - packages=$( + # + # Backticks are *required* here as '/bin/sh' on macOS is + # 'bash 3.2' and it can't handle the following: + # + # var=$( + # code here + # ) + # + # shellcheck disable=2006 + packages=` case $os in Linux*) # Commands which print packages one per line. @@ -267,7 +276,7 @@ get_pkgs() { command -v pkg_info && pkg_info ;; esac | wc -l - ) + ` log pkgs "$packages" >&6 } |
