Le Vendredi 24 Novembre 2006 10:32, Feth AREZKI a écrit :
> Its purpose is to install wormux svn in /usr/local/ on debian and ubuntu
> systems out of nothing -it will install build dependencies using apt-get.

Test to check if user is ussing Ubuntu:
   test $(grep -c Ubuntu /etc/issue) -eq 0
(use it in "if ...; then ...")

> So, give me your opinion, and if you feel it might be useful, do whatever
> you want with it.

They are to many questions :-p

You can use $1 to get destination directory for example.

DESTDIR="$1"
if [ "x$TESTDIR" == "x" ]; then DESTDIR="$HOME"; done

... are you sure you want to download Wormux in $DESTDIR ? ...
... (you change use different directory by using $0 [destdir]) ...

> The script has been tested somehow succesfully on debian unstable and
> ubuntu dapper. It chooses between cmake and autotools according to a dirty
> way (it installs cmake first...).

It doesn't work here since sudo "command arg" is not the right syntax (sudo 
command arg).

This must be better:

function run_as_root
{
  if [ "$SUWAY" == "sudo" ]; then
    $SUWAY $*
  else
    $SUWAY "$@"
  fi
}

(not sure that "$@" is the the expression, or you can use "$*")

Haypo

_______________________________________________
Wormux-dev mailing list
Wormux-dev@gna.org
https://mail.gna.org/listinfo/wormux-dev

Répondre à