2 # review - Move a certain revision from sunrise/ to reviewed/
3 # Released into the public domain
5 source /etc/init.d/functions.sh
20 DIFF_OPTS="${DIFF_OPTS:--Nur}"
23 if [[ "$opt_norepoman" == "0" ]] ; then
24 ebegin "Running repoman"
25 export PORTDIR_OVERLAY="$(pwd)"
34 ${BOLD}Usage:${NORMAL} ${LIGHTBLUE}$0${NORMAL} [ ${GREEN}options${NORMAL} ] ${BLUE}revision${NORMAL}
36 ${GREEN}options${NORMAL}:
37 ${BOLD}--help, -h${NORMAL} Show help
38 ${BOLD}--norepoman, -p${NORMAL} Skip repoman check
39 ${BOLD}--noupdate, -d${NORMAL} Don't update from repository before committing
40 ${BOLD}--quiet, -q${NORMAL} Don't ask for confirmation
41 ${BOLD}--verbose, -v${NORMAL} Show detailed information during commit
46 while [[ $# > 0 ]] ; do
68 echo "!!! Error: Unknown option ${1}. See: $0 -h"
76 LC_ALL="C" ls -d *-* > profiles/categories
77 if [[ $(git diff profiles/categories) ]]; then
78 git diff profiles/categories | if [[ "$opt_quiet" == "0" ]] ; then less; else cat; fi
79 echo -n "${BOLD}Commit changes?${NORMAL} [${GREEN}Yes${NORMAL}/${RED}No${NORMAL}] "
84 git commit -m "Automatic update to categories" profiles/categories || exit 1
93 egencache --ignore-default-opts --portdir-overlay=. \
94 --repo=sunrise --update-use-local-desc || exit $?
96 if [[ $(git diff profiles/use.local.desc) ]]; then
97 git diff profiles/use.local.desc | if [[ "$opt_quiet" == "0" ]] ; then less; else cat; fi
98 echo -n "${BOLD}Commit changes?${NORMAL} [${GREEN}Yes${NORMAL}/${RED}No${NORMAL}] "
103 git commit -m "Automatic update to use.local.desc" profiles/use.local.desc || exit 1
112 ebegin "Updating working copy to latest version from repository"
116 repoman_check || exit $?
118 ebegin "Running portdupe"
122 if [[ "$opt_quiet" == "0" ]] ; then
123 git diff reviewed/master master
125 ) | if [[ "$opt_quiet" == "0" ]] ; then less; else cat; fi
127 if [[ "$opt_quiet" == "0" ]] ; then
129 echo -n "${BOLD}Commit changes?${NORMAL} [${GREEN}Yes${NORMAL}/${RED}No${NORMAL}] "
144 ebegin "Pushing changes..."
145 if [[ "$opt_verbose" == "1" ]] ; then
146 git push -v origin master
147 git push -v reviewed master
149 git push origin master
150 git push reviewed master