#!/bin/bash # Pass directory to sync to SD card as parameter 1 # Mounts & syncs any directory in current directory # to an SD card that is named the same as the directory. # Also sets special file settings on the SD card so that # MIST displays them correctly. if [ $USER != root ]; then echo "Must be run as root!" exit 1 fi # copy from $1 parameter which is the subdirectory from here # $2 is the Volume to copy to. if [ -z "$1" ]; then echo "Usage: linux_sync Arcade" exit 1 fi VOLUME=${1%/} mkdir -p /mnt/MIST #mount /dev/disk/by-uuid/3E42-111B /mnt/MIST mount -L ${VOLUME@U} /mnt/MIST if [ ! -f /mnt/MIST/mist.ini ]; then echo ERROR Not Mounted!!! exit 1 fi rsync -uvtr --modify-window=1 --delete --exclude='*.ini' --exclude='*.CFG' --exclude='*.RAM' --exclude='*.sav' \ --exclude='QXL.WIN' \ --exclude='Next186.vhd' \ --exclude='.Trashes' --exclude='.fseventsd' --exclude='.Spotlight-V100' --exclude='System Volume Information' \ --exclude='.DS_Store' \ $VOLUME/ /mnt/MIST #Hide RBFs if [ "$VOLUME" = "Arcade" ]; then cd /mnt/MIST fatattr +h JT-*/jt*.rbf #Make directories visible fatattr +s JT-CPS* JT-SYSTEM16 JT-OTHER Gehstock/IremM72 Gehstock/IremM92 Gehstock/Williams Gehstock/Sega-System-1 Gehstock/Midway-MCR cd Gehstock fatattr +h Scramble.rbf Galaxian.rbf fatattr +h DKong.rbf GBeret.rbf fatattr +h Druaga.rbf fatattr +h Williams/*.rbf fatattr +h Sega-System-1/Segasys1.rbf fatattr +h Midway-MCR/mcr*.rbf fatattr +h Jailbrek.rbf fatattr +h IremM72/*.rbf fatattr +h IremM92/*.rbf #Remove 64MB games from CPS2 cd /mnt/MIST/JT-CPS2/ rm -f 'Dungeons & Dragons_ Shadow over Mystara (Euro 960619).arc' "Night Warriors_ Darkstalkers' Revenge (Euro 950316).arc" 'Street Fighter Alpha 3 (Euro 980904).arc' 'X-Men_ Children of the Atom (Euro 950331).arc' 'Cyberbots_ Fullmetal Madness (Euro 950424).arc' 'X-Men Vs. Street Fighter (Euro 961004).arc' 'X-Men_ Children of the Atom (Euro 950331).arc' 'Vampire Hunter 2_ Darkstalkers Revenge (Japan 970929).arc' ' Vampire Savior 2_ The Lord of Vampire (Japan 970913).arc' 'Vampire Savior_ The Lord of Vampire (Euro 970519).arc' 'Street Fighter Alpha 2 (Euro 960229).arc' "Street Fighter Zero 2 Alpha (Japan 960805).arc" "Hyper Street Fighter II_ The Anniversary Edition (USA 040202).arc" "Mars Matrix_ Hyper Solid Shooting (USA 000412).arc" "Marvel Super Heroes (Euro 951024).arc" "Marvel Super Heroes Vs. Street Fighter (Euro 970625).arc" "Marvel Vs. Capcom_ Clash of Super Heroes (Euro 980123).arc" "Vampire Savior 2_ The Lord of Vampire (Japan 970913).arc" cd /tmp fi sleep 5s umount /mnt/MIST