Skip to content
Snippets Groups Projects
Commit 1ff2f8f4 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Add diff subcommands

parent 569bc085
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,9 @@ function usage {
echo " distclean" >&2
echo " build" >&2
echo " clean" >&2
echo " diff" >&2
echo " diff_origin" >&2
echo " diff_upstream" >&2
echo " fetch" >&2
echo " unfetch" >&2
echo " prepare" >&2
......@@ -31,6 +34,7 @@ function usage {
echo " stage" >&2
echo " unstage" >&2
echo " status" >&2
echo " status_origin" >&2
echo " status_upstream" >&2
echo " tar" >&2
echo " untar" >&2
......@@ -122,6 +126,17 @@ function op {
git -C source diff --name-status
fi
;;
status_origin)
if [ -n "$GIT" ]
then
if [ -n "$BRANCH" ]
then
git -C source diff --name-status "origin/$BRANCH"
else
git -C source diff --name-status "origin/master"
fi
fi
;;
status_upstream)
if [ -n "$GIT_UPSTREAM" ]
then
......@@ -133,6 +148,34 @@ function op {
fi
fi
;;
diff)
if [ -n "$GIT" ]
then
git -C source diff
fi
;;
diff_origin)
if [ -n "$GIT" ]
then
if [ -n "$BRANCH" ]
then
git -C source diff "origin/$BRANCH"
else
git -C source diff "origin/master"
fi
fi
;;
diff_upstream)
if [ -n "$GIT_UPSTREAM" ]
then
if [ -n "$BRANCH" ]
then
git -C source diff "upstream/$BRANCH"
else
git -C source diff "upstream/master"
fi
fi
;;
update)
pushd source > /dev/null
skip=0
......
#!/usr/bin/env bash
set -e
source config.sh
if [ $# = 0 ]
then
recipes="$(ls -1 recipes)"
else
recipes="$@"
fi
for recipe in $recipes
do
if [ -d "recipes/$recipe/source" ]
then
status="$(COOK_QUIET=1 ./cook.sh "$recipe" status_origin)"
if [ -n "$status" ]
then
echo -e "\e[1m$recipe\e[0m\n$status"
fi
fi
done
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