xrsh-buildroot/buildroot-v86/board/v86/rootfs_overlay/root/hook.d/clipboard/receive.sh

15 lines
276 B
Bash
Raw Normal View History

2024-11-15 13:29:50 +01:00
#!/bin/sh
# usage: hook clipboard foo.mp3 [audio/mpeg]
# this forwards the hook to mimetype or filetype
source /etc/profile.sh
file="$1"
ext="${file##*.}"
mimetype="$2"
if test -n "$mimetype"; then
hook mimetype/"$mimetype" "$file"
else
hook filetype $ext "$file"
fi