Created
September 11, 2018 02:29
-
-
Save davidmroth/f72eff9a11932b0cdec7da869ce32820 to your computer and use it in GitHub Desktop.
Upload ROMS quickly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: | |
# cat Street\ Fighter\ 3.zip | ssh -p222 rom_uploader@192.168.86.34 process nes street_figter.zip | |
ROM_SAVE_FOLDER=/home/retropie/RetroPie/roms | |
ROM_TYPE=$1 | |
ROM_NAME=$2 | |
case $ROM_TYPE in | |
"nes") | |
filename=$2 | |
;; | |
"arcade") | |
filename=$2 | |
;; | |
*) | |
echo "Error!" | |
exit 1 | |
;; | |
esac | |
if test -e $ROM_SAVE_FOLDER/$1; then | |
cat > $ROM_SAVE_FOLDER/$1/$filename | |
echo "Uploaded successfully!!" | |
else | |
echo "Error!" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment