Release 4.4.5
[cyberduck.git] / debug.sh
blobe45bd9e2c395b35f35f97f2d54b90cb3c43764be
1 # Copyright (c) 2007 David Kocher. All rights reserved.
2 # http://cyberduck.ch/
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # Bug fixes, suggestions and comments should be sent to:
15 # dkocher@cyberduck.ch
17 #!/bin/sh
19 usage() {
20 echo ""
21 echo " Usage: debug.sh [--enable | -e] [--disable | -d]"
22 echo ""
25 enable() {
26 # When enabled, you can connect to the running application using
27 # -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
28 cp Info.plist.debug Info.plist;
29 make;
32 disable() {
33 svn revert Info.plist;
34 make;
37 while [ "$1" != "" ] # When there are arguments...
38 do case "$1" in
39 -e | --enable)
40 echo "Enabling debug configuration...";
41 enable;
42 exit 0;
43 echo "*** DONE. ***";
45 -d | --disable)
46 echo "Disabling debug configuration...";
47 disable;
48 echo "*** DONE. ***";
49 exit 0;
50 ;;
51 *)
52 echo "Option [$1] not one of [--enable, --disable]"; # Error (!)
53 usage;
54 exit 1
55 ;; # Abort Script Now
56 esac;
57 done;
59 usage;