]> andersk Git - test.git/blob - commit
- Perform all URL rewriting before loading the first resource (e.g. style sheets).
[test.git] / commit
1 #!/bin/bash -e
2
3 trap 'tput bel || :; echo Failed! >&2' EXIT
4
5 yes_no() {
6   local c
7   while :; do
8     c="$(set +e
9          trap 'stty echo -iuclc icanon 2>/dev/null' EXIT INT TERM QUIT
10          stty -echo iuclc -icanon 2>/dev/null
11          dd count=1 bs=1 2>/dev/null | od -An -tx1)"
12     case "$c" in
13       " 0a") if [ -n "$1" ]; then
14                [ $1 -eq 0 ] && echo "Y" || echo "N"
15                return $1
16              fi
17              ;;
18       " 79") echo "Y"
19              return 0
20              ;;
21       " 6e") echo "N"
22              return 1
23              ;;
24       "")    echo "Aborted" >&2
25              exit 1
26              ;;
27       *)     # The user pressed an unrecognized key. As we are not echoing
28              # any incorrect user input, alert the user by ringing the bell.
29              (tput bel) 2>/dev/null || :
30              ;;
31     esac
32   done
33 }
34
35 test -r configure.ac
36 svn update
37 {
38 rev=$(($(svn info | sed -e 's/^Revision: \(.*\)/\1/;t1;d;:1;q')+1))
39 } 2>/dev/null
40 prj="$(sed -e 's/^AC_INIT(\([^,]*\),.*/\1/;t1;d;:1;q' configure.ac)"
41 ver="$(sed -e 's/^AC_INIT([^,]*, *\([^,]*\),.*/\1/;t1;d;:1;q' configure.ac)"
42 sed -ie 's/^\(VCS_REVISION=\).*/\1'"${rev}"'/' configure.ac
43 touch shellinabox/vt100.jspp shellinabox/shell_in_a_box.jspp
44 make all distcheck
45 ( trap 'rm -rf "${prj}-${ver}"' EXIT
46   rm -f "${prj}-${ver}" &&
47   tar zfx "${prj}-${ver}.tar.gz" &&
48   cd "${prj}-${ver}" &&
49   fakeroot dpkg-buildpackage -us -uc &&
50   cd .. &&
51   rm -f $(ls "${prj}_${ver}-"*.* | egrep -v '.deb$') ) || :
52 svn diff $(svn st |
53            egrep -v ' configure$| aclocal.m4$|^[?]' |
54            sed -e 's/^[^ ]* *//') | less
55 echo -n 'Commit these changes (Y/n): '
56 yes_no 0 || exit 1
57 svn commit
58
59 trap '' EXIT
60 exit 0
This page took 0.033386 seconds and 5 git commands to generate.