Advertisement
Guest User

MegaSync Multiple Instances

a guest
Nov 6th, 2014
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.66 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #################################
  4. #               #
  5. #  Multiple MegaSync instances  #
  6. #  darkadan v0.1        #
  7. #               #
  8. #################################
  9.  
  10. sleep 1s
  11. notify-send -t 60 "Start Script Multiple MegaSync Instances"
  12.  
  13. #ori=$HOME
  14. ori="/tmp/MegaSyncInstances"
  15. megasyncs=(personal seudonimo)
  16.  
  17. for d in ${megasyncs[@]}
  18. do
  19.     HOME=$ori
  20.     sleep 1s
  21.     if ! [ -d $HOME/$d ]; then
  22.         echo "Creando directorio config MegaSync -> "$d
  23.         notify-send -t 60 "Creando directorio config MegaSync -> "$d
  24.         mkdir -p $HOME/$d
  25.     fi
  26.         echo "Running MegaSync -> "$d
  27.         notify-send -t 60 "Running MegaSync -> "$d
  28.         HOME=$HOME/$d megasync &
  29.         echo "Final "$d
  30.         HOME=$ori
  31. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement