Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Download directory (temporary)
- temp_dir=$(mktemp -d)
- # Download and unzip the cheat files
- wget https://github.com/iSharingan/CTRPF-AR-CHEAT-CODES/archive/refs/heads/master.zip -O "$temp_dir/cheats.zip" || {
- echo "Error downloading cheat files. Please check your internet connection."
- exit 1
- }
- unzip "$temp_dir/cheats.zip" -d "$temp_dir" || {
- echo "Error unzipping cheat files. Please check the archive integrity."
- exit 1
- }
- # Select emulator
- echo "Select your emulator:"
- echo "1. Old Citra"
- echo "2. Lime3DS (AppImage)"
- echo "3. Lime3DS (Flathub)"
- echo "4. Pablo MK7's Citra (AppImage)"
- read emulador
- # Define destination folder based on emulator (improve error handling)
- case $emulador in
- 1)
- dest_dir="/home/$USER/.local/share/citra-emu"
- ;;
- 2)
- dest_dir="/home/$USER/.local/share/lime3ds-emu"
- ;;
- 3)
- dest_dir="/home/$USER/.var/app/io.github.lime3ds.Lime3DS/data/lime3ds-emu"
- ;;
- 4)
- dest_dir="/home/$USER/.local/share/citra-emu"
- ;;
- *)
- echo "Invalid emulator selection."
- exit 1
- ;;
- esac
- # Create "cheats" subfolder if it doesn't exist
- cheats_dir="$dest_dir/cheats"
- if [ ! -d "$cheats_dir" ]; then
- mkdir -p "$cheats_dir"
- echo "The '$cheats_dir' folder has been created."
- fi
- # Get and copy cheat files
- source_dir="$temp_dir/CTRPF-AR-CHEAT-CODES-master/Cheats" # Assuming all cheats are in the "Cheats" folder
- find "$source_dir" -type f -exec cp {} "$cheats_dir" \;
- # User messages
- echo "Starting the copy of the files..."
- echo "Copy completed. You can close the script."
- # Clean up temporary directory
- rm -rf "$temp_dir"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement