New bits for libretro-super.sh

This commit is contained in:
T. Joseph Carter 2015-04-05 22:53:51 -07:00
parent 54acbcaaee
commit fa4e6dc099

View File

@ -36,6 +36,10 @@ fetch_revision_git() {
git log -n 1 --pretty=format:%H git log -n 1 --pretty=format:%H
} }
local_files_git() {
git diff-files --quiet --ignore-submodules
return $?
}
# fetch_revision: Output SCM-dependent revision string of a module # fetch_revision: Output SCM-dependent revision string of a module
# (currently just calls fetch_revision_git) # (currently just calls fetch_revision_git)
@ -44,3 +48,18 @@ fetch_revision_git() {
fetch_revision() { fetch_revision() {
fetch_revision_git $1 fetch_revision_git $1
} }
module_get_revision() {
if [ -d "$WORKDIR/$module_dir" ]; then
cd "$WORKDIR/$module_dir"
case "$module_fetch_rule" in
git)
if [ -n "$1" ]; then
git diff-files --quiet --ignore-submodules || echo -n "changed from "
fi
git log -n 1 --pretty=format:%H
;;
*) ;;
esac
fi
}