View Single Post
Posts: 1,523 | Thanked: 1,997 times | Joined on Jul 2011 @ not your mom's FOSS basement
#1588
Originally Posted by karam View Post
aah sorry but what did you mean with this

Btw; maybe outsource the dependencies installation too in a separate script and do a test using dpkg or apt before if they are installed, otherwise download & install package(s).

i guess i have bad english please make it more clear to me

@peterleinchen

hmm i was thinking to make the vfs-cahe changes when the brightness is on (will do this in the next update )

but i don't have my N900 now
so will be a bit late till the next update
To get rid of "apt-get install *" in install scripts directly, and to move them out to a separate 'install-dependencies.sh' like script. In it, before directly calling 'apt-get install', you should test if the package in question, like 'dbus-scripts', is already installing by executing 'dpkg –get-selection | grep dbus-scripts' or similar ('apt-show-versions' maybe), also for 'kernel-power-settings'.

For the scripts itself, when using 'bash' or 'ash', there should be a shebang in the respective shell scripts that specify the correct shell to use:

#!/bin/bash

#!/bin/sh

For further read: http://en.wikipedia.org/wiki/Shebang_%28Unix%29

As /bin/sh is usually a symbolic link on *NIX systems, it is the system's default shell if not specified otherwise. On N900, it's ash.

---

A small addentum: i'm a fan of 'neatness' / 'tidyness', so _i_ would rename all scripts to something like:

(- speedpatch-dependencies-install.sh)

- speedpatch-main-install.sh
- speedpatch-main-remove.sh / speedpatch-main-uninstall.sh

- speedpatch-battery-install.sh
- speedpatch-battery-remove.sh / speedpatch-battery-uninstall.sh

For all software, it should be clear what it is from the filename itself, and all filenames should be unique, not ambiguous. So install.txt /install.sh is way too generic and could belong to anything, as well as like for example readme.txt for documention - it _should_ be <package>-readme.txt or so.

I see this often for Miranda (a Windows messenger) plugins, in those cases you often overwrite the readme's from separate plugins in directory /docs because they are not made unique. It would be nice to adhere to a certain standard here. Thank you anyway for your efforts!

Last edited by don_falcone; 2011-08-02 at 21:57.
 

The Following 2 Users Say Thank You to don_falcone For This Useful Post: