aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2019-10-14 09:04:15 +0300
committerDylan Araps <dylan.araps@gmail.com>2019-10-14 09:04:15 +0300
commit616e1b0c3b97cb4b771b4c0c12119142f188c0ae (patch)
tree5f73e935a8fca5d88ef6b3ea861000c86f9f3801
parent44dca45301108a6d4c64e8e29fed6652391e5963 (diff)
downloadpfetch-616e1b0c3b97cb4b771b4c0c12119142f188c0ae.tar.gz
pfetch: fix android issues
-rwxr-xr-xpfetch5
1 files changed, 5 insertions, 0 deletions
diff --git a/pfetch b/pfetch
index d24a714..5fb6654 100755
--- a/pfetch
+++ b/pfetch
@@ -1326,6 +1326,11 @@ main() {
# This gives full control over what it displayed on the screen.
exec 6>&1 >/dev/null
+ # Ensure that the 'TMPDIR' is writable as heredocs use it and
+ # fail without the write permission. This was found to be the
+ # case on Android where the temporary directory requires root.
+ [ -w "${TMPDIR:-/tmp}" ] || export TMPDIR=~
+
# Generic color list.
# Disable warning about unused variables.
# shellcheck disable=2034