Homebrew RELEASE SDCard cleanup script for for MacOS users

  • Thread starter Thread starter rrocha
  • Start date Start date
  • Views Views 15,889
  • Replies Replies 7
  • Likes Likes 12

rrocha

Developer
Developer
Joined
Nov 21, 2016
Messages
137
Reaction score
299
Trophies
0
XP
1,895
Country
Portugal
For all the mac users that need to run multiple commands in the terminal, sometimes forget to do so and have to take the card out again and reboot, yada, yada, yada... Here's a script to do everything for you.

Features:
- disable and remove Spotlight indexing
- remove dot files
- remove dot underbar files
- remove fsevents traces
- fixes flags on all sdcard directories except Nintendo and Emutendo dir (as it might mess up installation files and cause corruption on installed titles/tickets)
- optionally ejects the sdcard when finished

Installation:
Drop it in your favorite directory. I suggest /usr/local/bin as it will be in system path automatically

Usage:
After you finish all your operations in your card, run it either by double clicking or via terminal (prior to ejecting). First run will ask for your volume name. Your sdcard label, basically. After this, it will remember it and will be able to find it. If you need to reset this setting because you changed the label, either delete the .switch-eject.conf file that will be created in your HOME dir or run the script via terminal using the -c flag.
You can also use the -e flag via terminal for auto-eject when finished. If you want the script to always perform the auto-eject, change line 71 from [ ! -z "${e}" ] && echo "Ejecting ${VOL}" && sudo umount ${VOL} to echo "Ejecting ${VOL}" && sudo umount ${VOL}

Enjoy
 

Attachments

Last edited by rrocha,
For anyone trying this in 2022, after using this script whenever I try to launch a game I get this error: "Could not start the software. Please try again from the HOME Menu."

EDIT: Now I realize I should have changed "emutendo" for emuMMC in the script so that it didn't mess with flags on that directory :(
@rrocha any way to easily fix this? now not even re-installing the games will make it work
 
Last edited by alucardx2,
For anyone trying this in 2022, after using this script whenever I try to launch a game I get this error: "Could not start the software. Please try again from the HOME Menu."

EDIT: Now I realize I should have changed "emutendo" for emuMMC in the script so that it didn't mess with flags on that directory :(
@rrocha any way to easily fix this? now not even re-installing the games will make it work
Have you tried the archive bit fix in Hekate tools menu?
 
  • Like
Reactions: alucardx2
That worked! Thanks so much man
By the way are directories case sensitive in the script? For example, if the folder is Nintendo but in the script it says nintendo, would the directory be considered?

EDIT: Nevermind, I figured out the -i makes it case insensitive, so it should be fine as it is
 
Last edited by alucardx2,
  • Like
Reactions: hippy dave

Site & Scene News

Popular threads in this forum