1
0
mirror of https://github.com/deadw00d/AROS.git synced 2025-12-08 06:20:50 +00:00
Files
AROS-v0/scripts/repo_rev.sh
2021-05-01 13:57:56 +02:00

18 lines
352 B
Bash
Executable File

#!/bin/sh
#
# get repository revision via svn or via git
#
inside_git_repo=$(cd "$1" && git rev-parse --is-inside-work-tree 2>/dev/null)
if test -d "$1/.svn"; then
svn info "$1" | sed -n 's/Revision: //p'
else
if [ "$inside_git_repo" = "true" ]; then
cd "$1"
git rev-parse --short HEAD
else
echo "NoRev"
fi
fi