Merge lp://qastaging/~james2432/hyberia/Install into lp://qastaging/~registry/hyberia/0.2

Proposed by Jamie Nadeau
Status: Merged
Approved by: Mathieu Charron
Approved revision: not available
Merged at revision: not available
Proposed branch: lp://qastaging/~james2432/hyberia/Install
Merge into: lp://qastaging/~registry/hyberia/0.2
Diff against target: 202 lines (+93/-27)
2 files modified
README (+19/-13)
install.sh (+74/-14)
To merge this branch: bzr merge lp://qastaging/~james2432/hyberia/Install
Reviewer Review Type Date Requested Status
Mathieu Charron (community) Approve
Review via email: mp+16316@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Jamie Nadeau (james2432) wrote :

Finished the install bash

43. By Jamie Nadeau

Updated README
Corrected english

Revision history for this message
Mathieu Charron (elwillow) wrote :

Looks good. There is maybe place for improvement but it's gonna work.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2009-12-17 07:40:09 +0000
3+++ README 2009-12-18 15:16:15 +0000
4@@ -2,7 +2,7 @@
5 ============
6
7 Version : 0.1
8-Revision : 36
9+Revision : 43
10
11 1) Authors and thanks
12 ---------------------
13@@ -18,7 +18,7 @@
14 Thanks to:
15
16 The MPlayer project for their outstanding player
17-Matroska for their great container that don't suck.
18+Matroska for their great container that doesn't suck.
19
20 2) Licensing
21 ------------
22@@ -46,7 +46,8 @@
23 ---------------
24
25 * Python 2.6
26-* C compiler (like gcc)
27+* C compiler (gcc)
28+* C++ compiler (g++)
29 * mkvtoolnix
30 * MPlayer with demuxer for you video files
31 * Custom xorg configuration (optional)
32@@ -56,7 +57,7 @@
33 @TODO: Missing how to configure xorg and initrc
34 @TODO: add source for software
35
36-There is NO check if those program are installed. You should make sure they are.
37+There is NO check if those programs are installed. You should make sure they are.
38
39 4) Prerequisites
40 ----------------
41@@ -66,13 +67,13 @@
42 First you need to rename your file according to a specific pattern:
43 - The first 4 characters are the time the video will be played in
44 24 military hours format (4h00 PM = 1600).
45- You time need to comply to a _modulus 5_. 1604 is not valid.
46+ Minutes need to comply with a modulus 5, meaning must be a multiple of 5. 1604 is invalid.
47
48 - A dot "."
49
50 - The name of the video. it will be used for the subtitling of the
51 introduction video. It NEEDS to be unique.
52- NO SPACE. Use underscore, they will be replace by space. Also, don't
53+ NO SPACE. Use underscores, they will be replaced by space. Also, don't
54 worry about the case, it will be `Title` for the intro video.
55
56 - The ".mkv" string for extension.
57@@ -85,14 +86,14 @@
58 ** File structure **
59
60 The file structure is simple, inside the folder in the LOCATION config
61-entry you will need one folder for each day. The name of the folder is the
62-day of the month with a zero (aka 04 for the 4th of the month).
63+entry you will need one folder for each day. The name of the folder is a
64+zero padded day of the month(04 for the 4th of the month,10 for the 10th of the month).
65 If the location does not exist, the script will die.
66 The script will also create the folder structure in the TMP-LOCATION.
67 If you are not sure what is the structure delete the TMP-LOCATION folder
68 and it will be recreated.
69
70-Since the default is in the /tmp you should worry to much, it is wipe
71+Since the default is in the /tmp you shouldn't worry to much, as it is wiped
72 at each reboot. Just make sure there is enough space for the intro videos.
73
74
75@@ -101,10 +102,15 @@
76
77 Until there is a better way to install this setup, follow these instructions:
78
79-- Execute:
80- ./run_me.sh install
81+- Execute as root:
82+ ./install.sh
83 It will build and install toueid and readconfig then execute setup.py.
84- The first argument will be pass on.
85+
86+ This accepts the fallowing arguments: install, uninstall, clean
87+
88+ -install: This option is selected by default, and will build and install the application
89+ -uninstall: This will uninstall the application
90+ -clean: cleans the temporary files created during build
91
92 - Now run toueid and check if there is any error in the logs
93 Just hit ctrl+c when you're done (toueid will send SIGTERM to mplayer and
94@@ -117,7 +123,7 @@
95 - Enjoy
96
97 ***** WARNING WARNING ******
98-THIS IS A BETA, WE ARE NOT RESPONSABLE IF YOUR MACHINE EXPLODE.
99+THIS IS A BETA, WE ARE NOT RESPONSABLE IF YOUR MACHINE EXPLODES.
100 PLEASE BE AWARE THAT IT IS NOT PRODUCTION READY.
101 We hope 0.2 will be.
102
103
104=== modified file 'install.sh'
105--- install.sh 2009-12-17 07:40:09 +0000
106+++ install.sh 2009-12-18 15:16:15 +0000
107@@ -1,21 +1,81 @@
108-#!/bin/sh
109+#!/bin/bash
110 # Author: G-Anime
111-# Contributor: Mathieu Charron
112+# Contributor: Mathieu Charron, Jamie Nadeau
113 # Version: 0.1
114 # Revision 39
115 #
116 # Copyright 2008, Author Name, example.org
117 # Licensed under the Eiffel Forum License 2.
118
119-
120-echo "Building libReadToueiConfig"
121-cd readconfig
122-make $1
123-cd ..
124-
125-echo "Building toueid"
126-cd toueid
127-make $1
128-cd ..
129-
130-python setup.py $1
131+# make sure we're running as root
132+if [ "$UID" != "0" ]; then
133+ echo "Sorry, must be root. Exiting..."
134+ exit
135+fi
136+
137+
138+#Get number of arguments
139+COMMAND=
140+
141+
142+if ["$1"=""]; then
143+ COMMAND='install'
144+else
145+ COMMAND=$1
146+fi
147+
148+case "$COMMAND" in
149+'install')
150+ echo "Building libReadToueiConfig"
151+ cd readconfig
152+ make
153+
154+ echo "Installing libReadToueiConfig"
155+ make $COMMAND
156+ cd ..
157+
158+ echo "Building toueid"
159+ cd toueid
160+ make
161+
162+ echo "Installing toueid"
163+ make $COMMAND
164+ cd ..
165+
166+ echo "Installing touei"
167+ python setup.py $COMMAND --record uninstall.db
168+
169+#end of install
170+;;
171+'uninstall')
172+ echo "Uninstalling libReadToueiConfig"
173+ cd readconfig
174+ make $COMMAND
175+ cd ..
176+
177+ echo "Uninstalling toueid"
178+ cd toueid
179+ make $COMMAND
180+ cd ..
181+
182+ echo "Uninstalling touei"
183+ cat uninstall.db | xargs rm -rf
184+#end uninstall
185+;;
186+'clean')
187+ echo "Cleaning libReadToueiConfig"
188+ cd readconfig
189+ make $COMMAND
190+ cd ..
191+
192+ echo "Cleaning toueid"
193+ cd toueid
194+ make $COMMAND
195+ cd ..
196+
197+ echo "Cleaning touei"
198+ python setup.py $COMMAND
199+;;
200+esac
201+
202+

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: