Fallback to xterm if st is not available - localbin - leot's localbin (~/bin)
(HTM) hg clone https://bitbucket.org/iamleot/localbin
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) changeset b966cb4601098f568585eb76f76c5451ab4413e8
(DIR) parent e36d27d784eeb5aadf171a3bed5c729a78dedc9d
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Fri, 10 May 2019 19:45:27
Fallback to xterm if st is not available
Diffstat:
xterm | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff -r e36d27d784ee -r b966cb460109 xterm
--- a/xterm Fri May 10 19:44:54 2019 +0200
+++ b/xterm Fri May 10 19:45:27 2019 +0200
@@ -1,3 +1,11 @@
#!/bin/sh
-exec /usr/pkg/bin/st "$@"
+#
+# Invoke st as xterm if available, falling back to xterm.
+#
+
+if [ -x /usr/pkg/bin/st ]; then
+ exec /usr/pkg/bin/st "$@"
+fi
+
+exec /usr/X11R7/bin/xterm "$@"