Skip to content
Snippets Groups Projects
Commit 9bc5a872 authored by Jani Nikula's avatar Jani Nikula
Browse files

dim: add command to check for dim updates


Add a command to check if the user is running an up-to-date version of
dim.

Acked-by: default avatarDaniel Vetter <daniel@ffwll.ch>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent d0a01aed
No related branches found
No related tags found
No related merge requests found
......@@ -179,6 +179,27 @@ if [ "$subcommand" != "setup" -a "$subcommand" != "help" -a "$subcommand" != "us
xargs -n 1 echo | grep '^origin' | sed -e 's/^origin\///'`
fi
function dim_uptodate
{
local using="${BASH_SOURCE[0]}"
if [[ ! -e "$using" ]]; then
echo "$dim: could not figure out the version being used ($using)." >&2
exit 1
fi
if [[ ! -e "$DIM_PREFIX/maintainer-tools/.git" ]]; then
echo "$dim: could not find the upstream repo for $dim." >&2
exit 1
fi
if ! git --git-dir=$DIM_PREFIX/maintainer-tools/.git show origin/maintainer-tools:dim |\
diff "$using" - >& /dev/null; then
echo "$dim: not running upstream version of the script." >&2
exit 1
fi
}
# get message id from file
# $1 = file
message_get_id ()
......
......@@ -317,6 +317,10 @@ list-upstreams
List of all upstreams commonly used for pull requests. Useful for autocompletion
scripts.
uptodate
--------
Try to check if you're running an up-to-date version of **dim**.
help
----
Show this help. Install **rst2man(1)** for best results.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment