BillySheet/external/update_submodules.sh

14 lines
314 B
Bash
Executable File

#! /usr/bin/env bash
for dir in * ; do
dir=${dir%*/}
if [ -d "${dir}" ]; then
echo "${dir}"
cd "${dir}"
latest_commit_with_tag=`git rev-list --tags --max-count=1`
latest_tag=`git describe --tags ${latest_commit_with_tag}`
git checkout "${latest_tag}"
cd ..
fi
done