Disclaimer: I have used Linux for two years. Despite exploring so much in these wonderful times, I am still a horrible N008 at this. So please pardon me if the solution seems obvious. Besides, I have only used debian based distros.So, I have been working on a project: Simplified Portable Minecraft for Linux. Well, it's not technically finished yet. So I have formatted a 32GB USB Flash Drive to ext4 (gparted ftw!!!) and made an autorun script which:Copies updated game data on flash drive to .minecraft folder in the User's folder (eradicating the older one.)Launches Minecraft from a .jar file.Now, I want it to copy updated game data back to the pendrive once it is closed. Here's a sample of the code in autorun.sh . Can you help me?#!/bin/bash -l#$ -S /bin/bash#$ -N $1rm -rf ~/.minecraftcp -rn  /media/$1/MC/minecraft  ~/mv /home/$1/minecraft /home/$1/.minecraftjava -jar Minecraft.jar$1 stands for the user. Thanks for all your help.
How to make a script which automatically copies game save files to a flash drive after the game is closed
debian;ubuntu;synchronization;minecraft