#!/bin/bash # ToDo # # git pull submodules if .gitmodules exists? # # run as kyle if [[ $(id -u) -eq 0 ]]; then su - kyle fi declare -a REPODIRS=("REPO" "repo" "repo crypto" "repo cs" "repo emu" "repo exploit" "repo gaming r" "repo malware" "repo r" "repo small projects" "repo webdesign" "repo rice" "repo cs edu" "repo debug-profile" "repo gitgud" "repo weeb" "repo lang tools") for d in "${REPODIRS[@]}"; do cd "$d" for r in *; do if [[ ! -d "$r" ]]; then echo -e "skipping ${r} file as it is not a repo of known type" continue fi # skip files like .zip or tarballs as they're not REPOs echo -e "\e[00;32mUpdating ${r}\e[00m" cd "$r" if [[ -d ".git" ]]; then git pull; fi if [[ -d ".svn" ]]; then svn up; fi if [[ -d "CVS" ]]; then CVS_RSH="ssh" cvs update -Pd; fi if [[ ! $? -eq 0 ]]; then echo "failed to update repo: ${r}"; fi cd ../ done cd ../ done exit 0