termux-packages/packages/hollywood/hollywood-1.20_lib_hollywoo...

33 lines
1.0 KiB
Diff
Raw Normal View History

diff -uNr hollywood-1.20/lib/hollywood/hexdump hollywood-1.20.mod/lib/hollywood/hexdump
--- hollywood-1.20/lib/hollywood/hexdump 2019-06-12 07:07:01.000000000 +0300
+++ hollywood-1.20.mod/lib/hollywood/hexdump 2020-01-02 15:02:15.718797672 +0200
@@ -15,12 +15,25 @@
# limitations under the License.
command -v hexdump >/dev/null 2>&1 || exit 1
-command -v ccze >/dev/null 2>&1 || exit 1
+
+_HAS_CCZE=false
+if command -v ccze >/dev/null 2>&1; then
+ _HAS_CCZE=true
+fi
trap "pkill -f -9 lib/hollywood/ >/dev/null 2>&1; exit" INT
while true; do
- for f in $(ls /usr/bin/ | sort -R); do
- head -c 4096 "/usr/bin/$f" | hexdump -C | ccze -A -c default=green -c dir="bold green"
+ for f in $(ls @TERMUX_PREFIX@/bin/ | sort -R); do
+ if [ -d "@TERMUX_PREFIX@/bin/$f" ]; then
+ continue
+ fi
+
+ if ${_HAS_CCZE}; then
+ head -c 4096 "@TERMUX_PREFIX@/bin/$f" | hexdump -C | ccze -A -c default=green -c dir="bold green"
+ else
+ head -c 4096 "@TERMUX_PREFIX@/bin/$f" | hexdump -C
+ fi
+
sleep 0.7
done
done