diff options
Diffstat (limited to 'tiny/repos-update.sh')
-rw-r--r-- | tiny/repos-update.sh | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tiny/repos-update.sh b/tiny/repos-update.sh index 048fbc4..be89cae 100644 --- a/tiny/repos-update.sh +++ b/tiny/repos-update.sh @@ -1,22 +1,35 @@ #!/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 gaming r" "repo r" "repo small projects") +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 + if [[ ! $? -eq 0 ]]; then echo "failed to update repo: ${r}"; fi cd ../ done cd ../ |