From 28b14bc7aa563a5d1fb54d4a19c309d5512d6eda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2EFernando=20S=C3=A1nchez?= Date: Wed, 4 Jan 2012 03:40:17 +0100 Subject: [PATCH] Added lncuevana --- lncuevana.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 lncuevana.sh diff --git a/lncuevana.sh b/lncuevana.sh new file mode 100755 index 0000000..e31bf72 --- /dev/null +++ b/lncuevana.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# Script to copy Cuevana files to your home directory. +# Tested only with one cuevana instance at a time. +# The video can be played, but I need to test if it's deleted when the flash player is closed. +# @author: balkian + +destfile="$HOME/VideoCuevana$$" +info=($(lsof -c /npview/i | grep -i /tmp/flash | awk '{print $2; print $9}')) +dir="/proc/${info[0]}/fd" +file=${info[1]} +#echo "pid" $pid +#echo "file" $file +fdn=$(ls -l $dir | grep $file | awk '{print $8}') +ln -s $dir/$fdn $destfile && echo "Video linked successfully to $destfile." && echo "Enjoy"