Server-Root/attach_modules.sh

22 lines
531 B
Bash
Raw Normal View History

2018-08-01 14:31:44 -04:00
#!/bin/bash
2018-08-09 14:16:37 -04:00
git submodule foreach -q --recursive '
echo "Updating $name";
BRANCH=$(git config -f $toplevel/.gitmodules submodule.$name.branch || echo master)
if [ -z ${BRANCH} ]; then
BRANCH="master"
fi
git checkout ${BRANCH};
echo "git pull origin ${BRANCH}"
git pull origin ${BRANCH}'
2019-05-28 04:58:16 -04:00
git submodule foreach -q --recursive '
echo "Updating $name";
CHECKOUT=$(git config -f $toplevel/.gitmodules submodule.$name.checkout)
if [ ! -z ${CHECKOUT} ]; then
git checkout ${CHECKOUT};
echo "Checking out ${CHECKOUT} for $name"
fi
'