TOR: fix compilation
[tomato.git] / release / src / router / rp-pppoe / go-gui
blob2706261272eaa438bbbc834f771ff8480247ef21
1 #!/bin/sh
2 # LIC: GPL
3 #***********************************************************************
5 # go-gui
7 # Quick-start shell script to set up PPPoE and GUI wrapper
9 # Copyright (C) 2000 Roaring Penguin Software Inc.
11 # $Id$
12 #***********************************************************************
14 # GUI only works on Linux
15 if test "`uname`" != "Linux" ; then
16 echo "Sorry, the GUI only works on Linux."
17 exit 1
20 # Figure out directory of script
21 MYDIR=`dirname $0`
22 cd $MYDIR/src
24 echo "Running ./configure..."
25 ./configure
26 if [ "$?" != 0 ] ; then
27 echo "Oops! It looks like ./configure failed."
28 exit 1
31 echo "Running make..."
32 make
33 if [ "$?" != 0 ] ; then
34 echo "Oops! It looks like make failed."
35 exit 1
38 echo "Running make install..."
39 make install
41 if [ "$?" != 0 ] ; then
42 echo "Oops! It looks like make install failed."
43 exit 1
46 echo "Building GUI wrapper..."
47 cd ../gui
48 make
49 if [ "$?" != 0 ] ; then
50 echo "Oops! It looks like make failed."
51 exit 1
54 echo "Installing GUI..."
55 make install
57 if [ "$?" != 0 ] ; then
58 echo "Oops! It looks like make install failed."
59 exit 1
62 # Install entry in KDE menu
63 if test -n "$KDEDIR" ; then
64 echo "Installing KDE menu entry Internet : TkPPPoE..."
65 mkdir -p "$KDEDIR/share/applnk/Internet"
66 cat <<EOF > "$KDEDIR/share/applnk/Internet/tkpppoe.kdelnk"
67 # KDE Config File
68 [KDE Desktop Entry]
69 Name=TkPPPoE
70 Comment=Start/Stop PPPoE connections
71 Exec=tkpppoe
72 Terminal=0
73 Type=Application
74 EOF
77 # Install entry in GNOME menus
78 GNOMEDIR=`gnome-config --datadir 2>/dev/null`
79 if test -n "$GNOMEDIR" ; then
80 echo "Installing GNOME menu entry Internet : TkPPPoE..."
81 mkdir -p "$GNOMEDIR/gnome/apps/Internet"
82 cat <<EOF > "$GNOMEDIR/gnome/apps/Internet/tkpppoe.desktop"
83 [Desktop Entry]
84 Name=TkPPPoE
85 Comment=Start/Stop PPPoE connections
86 Exec=tkpppoe
87 Terminal=0
88 Type=Application
89 EOF
91 echo "Running GUI configuration tool..."
92 tkpppoe &
93 exit 0