Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # VLC libaccess_rar_plugin test
- # (C) John Peterson, GNU GPL 3
- function cyg2url {
- s=${1:1}
- s=${s//\ /%20}
- i=`expr index "$s" '/'`
- j=`expr $i + 1`
- result="file:///${s:i:1}:${s:j}"
- }
- x=0
- y=0
- _IFS="$IFS"; IFS=$(echo -en "\n\b")
- for f in $(find $1 | awk '(/rar/ && !/part[0-9]+\.rar/ && !/(sub|subs|subpack)\.rar/) || /part0+1\.rar/'); do
- ((x++))
- cyg2url "$f"
- f=$result
- ./vlc $f
- if [ "$?" -gt "0" ]
- then
- echo "Failed: $f"
- ((y++))
- read -p "<Press enter>"
- else
- echo "OK: $f"
- fi
- done
- IFS=$_IFS
- echo "Tested: $x
- Failed: $y"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement