#!/bin/sh # hostlist.sh - a demonstration of opie-sh # # Copyright (C) 2002 gonz@directbox.com # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # 20020524-1 - icon to hostlist # 20020517-1 - added icon, changed name in launcher # CFG=/opt/QtPalmtop/share/config/hostlist.cfg OPIE_SH=opie-sh hostlist() { ( echo "" echo "
" ) | $OPIE_SH -t hostlist -f & SCREENCLEAN=$! sleep 1 } ##################################################################### # # main about # ask to: start or edit list $OPIE_SH -m -g -t Hostlist -M "Welcome!" -0 Start -1 "Edit Hostlist" RETURNCODE=$? case $RETURNCODE in -1) echo died unexpectedly... | $OPIE_SH -f cleanup exit ;; 1) textedit $CFG cleanup ;; 0) if [ -f $CFG ] then hostlist else echo www,handhelds.org >$CFG ; hostlist fi cleanup ;; esac