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