Merge lp:~serapophis/quickly/Fixes into lp:~shanepatrickfagan/quickly/Quickly-vala

Proposed by Harald Wartig
Status: Merged
Approved by: Shane Fagan
Approved revision: 32
Merged at revision: 29
Proposed branch: lp:~serapophis/quickly/Fixes
Merge into: lp:~shanepatrickfagan/quickly/Quickly-vala
Diff against target: 142 lines (+102/-7)
5 files modified
design (+17/-1)
edit (+32/-2)
edit_run (+18/-1)
project_root/.run (+5/-2)
run (+30/-1)
To merge this branch: bzr merge lp:~serapophis/quickly/Fixes
Reviewer Review Type Date Requested Status
Shane Fagan Approve
Review via email: mp+36835@code.launchpad.net

Description of the change

 * Added support for the quickly help command
 * edit does now make use of $VISUAL and $EDITOR variables
 * run now produces a binary with the same name as the project
 * run now supports passing of commandline args to the created binary

To post a comment you must log in.
Revision history for this message
Shane Fagan (shanepatrickfagan) wrote :

Looks good to me awesome work thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'design'
2--- design 2010-09-27 20:16:46 +0000
3+++ design 2010-09-28 10:12:44 +0000
4@@ -1,3 +1,19 @@
5-#!/bin/sh
6+#!/bin/bash
7+
8+usage(){
9+ cat<<EOUSAGE
10+Usage:
11+ quickly `basename $0`
12+
13+Opens Glade UI editor so that you can edit the UI for dialogs
14+and windows in your project.
15+EOUSAGE
16+ exit 0
17+}
18+
19+# invoke usage
20+# call usage() function if any argument was supplied
21+[[ $# -ne 0 ]] && usage
22+
23 cd data/ui
24 glade *.ui
25
26=== modified file 'edit'
27--- edit 2010-09-25 18:07:02 +0000
28+++ edit 2010-09-28 10:12:44 +0000
29@@ -1,2 +1,32 @@
30-#!/bin/sh
31-gedit bin/*.vala
32+#!/bin/bash
33+
34+usage(){
35+ cat<<EOUSAGE
36+Usage:
37+ quickly `basename $0`
38+
39+A convenience command to open all of your vala files in your project
40+directory in your default editor, ready for editing.
41+
42+If you put yourself VISUAL or EDITOR environment variable, this latter will
43+be used.
44+EOUSAGE
45+ exit 0
46+}
47+
48+# invoke usage
49+# call usage() function if any argument was supplied
50+[[ $# -ne 0 ]] && usage
51+
52+# if $VISUAL is defined we use that
53+if test -n "$VISUAL"
54+then
55+ EDITOR=$VISUAL
56+fi
57+
58+# if $EDITOR is not defined we set gedit as default
59+if test -z "$EDITOR"
60+then
61+ EDITOR="gedit"
62+fi
63+eval $EDITOR bin/*.vala
64
65=== modified file 'edit_run'
66--- edit_run 2010-09-25 13:28:26 +0000
67+++ edit_run 2010-09-28 10:12:44 +0000
68@@ -1,2 +1,19 @@
69-#!/bin/sh
70+#!/bin/bash
71+
72+usage(){
73+ cat<<EOUSAGE
74+Usage:
75+ quickly `basename $0`
76+
77+Opens your default text editor for the .run script. This script is uset to
78+build and run your application. In most cases you only want to edit it when
79+you have to change the build process. When you add a new source file or
80+pkg dependency for example.
81+EOUSAGE
82+ exit 0
83+}
84+
85+# invoke usage
86+# call usage() function if any argument was supplied
87+[[ $# -ne 0 ]] && usage
88 xdg-open .run
89
90=== modified file 'project_root/.run'
91--- project_root/.run 2010-09-25 13:28:26 +0000
92+++ project_root/.run 2010-09-28 10:12:44 +0000
93@@ -1,6 +1,9 @@
94 #!/bin/sh
95 cd bin
96+# Get the name of the project. We use that as name for the binary.
97+PRJNAME=$(basename $(dirname $PWD))
98+
99 #feel free to change the next line to add bindings you are using and other classes you want to compile
100-valac --pkg gtk+-2.0 --pkg gmodule-2.0 *.vala
101+valac -o $PRJNAME --pkg gtk+-2.0 --pkg gmodule-2.0 *.vala
102 #dont change below here if you want it to run
103-./*
104+./$PRJNAME $@
105
106=== modified file 'run'
107--- run 2010-09-20 21:56:10 +0000
108+++ run 2010-09-28 10:12:44 +0000
109@@ -1,3 +1,32 @@
110 #!/bin/sh
111+
112+usage(){
113+ cat<<EOUSAGE
114+Usage:
115+ quickly run
116+
117+Runs your application. This is the best way to try test it out
118+while you are developing it. It starts up the main project window.
119+
120+ quickly run -- values -<whathever>
121+to pass "-whatever" and "values" to the executed program. Without that
122+if you use for instance --help, it would be Quickly help and not your
123+program one.
124+
125+EOUSAGE
126+ exit 0
127+}
128+
129+# handle commandline arguments befor -- and keep everything else
130+while [ $# -gt 0 ]
131+do
132+ case "$1" in
133+ --) shift; break;;
134+ *) usage break;;
135+ esac
136+ shift
137+done
138+
139 chmod +x .run
140-./.run
141+# run ".run" and pass all commandline arguments that where found after --
142+./.run $@

Subscribers

People subscribed via source and target branches

to all changes: