Merge pull request #64 in ITERATE/cyberduck from feature/windows/9074 to master
[cyberduck.git] / debug.sh
blobc718633539499b042e9b3b40f55d9511b2864a2c
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 setup/app/Info.plist.debug build/Cyberduck.app/Contents/Info.plist;
31 disable() {
32 cp setup/app/Info.plist build/Cyberduck.app/Contents/Info.plist;
35 while [ "$1" != "" ] # When there are arguments...
36 do case "$1" in
37 -e | --enable)
38 echo "Enabling debug configuration...";
39 enable;
40 exit 0;
41 echo "*** DONE. ***";
43 -d | --disable)
44 echo "Disabling debug configuration...";
45 disable;
46 echo "*** DONE. ***";
47 exit 0;
48 ;;
49 *)
50 echo "Option [$1] not one of [--enable, --disable]"; # Error (!)
51 usage;
52 exit 1
53 ;; # Abort Script Now
54 esac;
55 done;
57 usage;