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

15 lines
276 B
Bash
Executable File

#!/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