]>
git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - tools/make-git
2 ###############################################################################
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2007 Michael Tremer & Christian Schmidt #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 # A small helper to make the git functions comfortable #
22 ###############################################################################
23 ###############################################################################
27 ###############################################################################
29 [ -z $GIT_URL ] || exiterror
"You have to setup GIT_USER first."
31 GIT_URL
="ssh://${GIT_USER}@git.ipfire.org/pub/ipfire-3.x"
33 if [ -z $EDITOR ]; then
34 for i
in nano emacs vi
; do
35 EDITOR
=$
(which $i 2>/dev
/null
)
36 if ! [ -z $EDITOR ]; then
41 [ -z $EDITOR ] && exiterror
"You should have installed an editor."
44 ###############################################################################
46 # A small helper to make the git functions comfortable
48 ###############################################################################
55 git push
${GIT_URL} master
61 [ "$?" -eq "0" ] || exiterror
"git commit $* failed."
63 echo "${BOLD}Do you want to push, too? [y/N]${NORMAL}"
66 if [ "$i" -eq "$REPLY" ]; then
74 echo -ne "Make a local diff to last revision"
75 git
diff > ipfire-diff-$
(date +'%Y-%m-%d-%H:%M').
diff
77 echo "Diff was successfully saved to ipfire-diff-$(date +'%Y-%m-%d-%H:%M').diff"
82 echo -n "Updateing changelog from repository..."
84 [ -z $GIT_TAG ] || LAST_TAG
=$GIT_TAG
85 [ -z $LAST_TAG ] || EXT
="$LAST_TAG..HEAD"
87 git log
--pretty=short
--no-color $EXT > $BASEDIR/doc
/ChangeLog