Advertisement
Guest User

Untitled

a guest
Mar 27th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.69 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [ -n "$2" ] ; then
  4.     rebase="--rebase origin master"
  5.     echo -e "\nRebase requested...\n"
  6. fi
  7.  
  8. pushd .
  9.  
  10. MODSDIR="/home/vanessa/Minetest-related/mods"
  11.  
  12. cd $MODSDIR
  13.  
  14. for i in $( find ./ -maxdepth 2 -type d | grep -v attic | grep -v my_mods ); do
  15.     cd $MODSDIR
  16.     if [ -e "$i/.git" ] ; then
  17.         echo -e "\n>>>> Updating "$i"...\n"
  18.         cd $i
  19.         if [ -n "$rebase" ]; then
  20.             echo "git pull $rebase"
  21.             git pull $rebase
  22.         else
  23.             echo "git pull --commit"
  24.             git pull --commit
  25.         fi
  26.         echo
  27.     fi
  28. done
  29.  
  30. echo "Make sure IRC mod is up-to-date..."
  31.  
  32. cd /home/vanessa/Minetest-related/mods/kaezas_mods/irc/
  33.  
  34. git pull
  35. git submodule update
  36. popd
  37.  
  38. echo -e "\n\nUpdate complete.\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement