mirror of
https://github.com/pConst/basic_verilog.git
synced 2025-01-14 06:42:54 +08:00
Added batch update script for your git repos
This commit is contained in:
parent
937edbeb98
commit
b91f6adac5
21
scripts/update_git_repos.sh
Executable file
21
scripts/update_git_repos.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
# update_git_repos.sh
|
||||
# Konstantin Pavlov, pavlovconst@gmail.com
|
||||
#
|
||||
# Simple script to update all git repos in the current directory
|
||||
#
|
||||
# ===========================================================================
|
||||
# !! CAUTION! All repos will be reset and all uncommitted changes lost !!
|
||||
# ===========================================================================
|
||||
|
||||
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
|
||||
|
||||
eval $(ssh-agent)
|
||||
ssh-add
|
||||
|
||||
find . -maxdepth 2 -type d -exec git -C {} reset --hard \;
|
||||
find . -maxdepth 2 -type d -exec git -C {} submodule init \;
|
||||
find . -maxdepth 2 -type d -exec git -C {} submodule update \;
|
||||
|
||||
find . -maxdepth 2 -type d -exec echo {} ' ' \; -exec git -C {} pull \;
|
Loading…
x
Reference in New Issue
Block a user