Mercurial > hg > anonet-resdb
changeset 773:e771b7217646 draft
updated peer2anonet
author | d3v11 <d3v11@d3v11.ano> |
---|---|
date | Fri, 25 Nov 2011 22:34:39 +0000 |
parents | 1ba55b415d50 |
children | 5cb0c795b9e6 |
files | contrib/peer2anonet/peer2anonet |
diffstat | 1 files changed, 24 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/peer2anonet/peer2anonet Fri Nov 25 21:11:12 2011 +0000 +++ b/contrib/peer2anonet/peer2anonet Fri Nov 25 22:34:39 2011 +0000 @@ -6,10 +6,11 @@ USAGE(){ echo -e '\npeer2anonet:' - echo -e '\n --configure generate a new local configuration and exit' - echo -e '\n --update regenerate peer configurations' - echo -e '\n --configure-peer generate a new peer configuration and update' - echo -e '\n --rm-peer remove a peer configuration and update\n' + echo -e '\n --configure generate a new local configuration and exit' + echo -e '\n --update regenerate peer configurations' + echo -e '\n --configure-peer generate a new peer configuration and update' + echo -e '\n --rm-peer remove a peer configuration and update' + echo -e '\n --install-daemontools installs daemontools\n' exit 0 } @@ -264,6 +265,23 @@ fi } +INSTALL_DAEMONTOOLS(){ + [[ $(echo X`which gcc`) == X ]] && echo ' error: cannot find gcc' + [[ $(echo X`which gcc`) == X ]] && exit 1 + [[ $(echo X`which make`) == X ]] && echo ' error: cannot find make' + [[ $(echo X`which make`) == X ]] && exit 1 + mkdir -p /package + chmod 1755 /package + cd /package + wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz + gunzip daemontools-0.76.tar + tar -xpf daemontools-0.76.tar + rm -f daemontools-0.76.tar + cd admin/daemontools-0.76 + sed -i 's/gcc/gcc -include errno.h/g' src/conf-cc + package/install + } + if [ "$1" == '--configure' ]; then CONFIGURE @@ -275,6 +293,8 @@ elif [ "$1" == '--rm-peer' ]; then RM_PEER UPDATE +elif [ "$1" == '--rm-peer' ]; then + INSTALL_DAEMONTOOLS else USAGE fi