~mdkcore/dotbins

dotbins/update-git -rwxr-xr-x 928 bytes
2559c86bRodrigo Oliveira [power] Use loginctl instead of pm-* 1 year, 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
###############################################################
# This script was created by: MDK - mdk@qtrnn.io              #
# https://qtrnn.io                                            #
# Jul 10 2013                                                 #
# Last update on Oct 20 2020                                  #
#                                                             #
# Simple script to update git repositories (and its           #
# submodules) on the current dir                              #
###############################################################

echo "Updating git repositories..."
for each in ./*/
do
    (
        cd "$each" || exit
        echo "- $(basename "$each")"

        git rev-parse HEAD
        git remote update

        git submodule update --init --recursive
        git pull --rebase --prune --tags

        echo
    )
done

echo
echo "git repositories are updated now"