Advertisement
Guest User

Untitled

a guest
Mar 16th, 2019
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. # Extract file name from called ROM
  2. gname="$(basename "$3")"
  3. # build path to file and remove extension from ROM to add mp4 extension
  4. # $HOME variable will help users that are not stick to raspberry ;)
  5. ifgame="$HOME/RetroPie/videoloadingscreens/${gname%.*}.mp4"
  6. ifsystem="$HOME/RetroPie/videoloadingscreens/$1.mp4"
  7. default="$HOME/RetroPie/videoloadingscreens/default.mp4"
  8.  
  9. # If condition to check filename with -f switch, f means regular file
  10. if [[ -f $ifgame ]]; then
  11. cvlc --quiet --fullscreen --play-and-exit "$ifgame" > /dev/null 2>&1
  12. elif [[ -f $ifsystem ]]; then
  13. cvlc --quiet --fullscreen --play-and-exit "$ifsystem" > /dev/null 2>&1
  14. elif [[ -f $default ]]; then
  15. cvlc --quiet --fullscreen --play-and-exit "$default" > /dev/null 2>&1
  16. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement