📄 instnp
字号:
#!/bin/sh## NetPlug's cool 'installer' (unix)## $Id: instNP,v 1.5 1996/10/03 21:04:30 dl Exp dl $wishes="wish8.0 wish4.2 wish4.1 wishx wish"plugdir=/usr/local/lib# utility functioncreatedir() {if [ ! -d $1 ] ; then echo "Making you $1 dir..." mkdir $1else echo "You already have $1 dir, good !..."fi}# some os don't have cp -f some needs one...mycp(){dest=$1shiftfor F do ddest=$dest/$F if [ -f $ddest ]; then echo " removing old $ddest"; rm -f $ddest fi echo " copying $F as $ddest"; cp $F $ddestdone}echo "Searching for Tk 'wish' (4.1 or better 8.0 or 4.2) in your path..."for prog in $wishes; do IFS=: ; for dir in $PATH; do if [ -x $dir/$prog ] ; then WISH=$dir/$prog break 2 fi donedoneif [ -z "$WISH" ] ; then cat << _EOF1_*** Sorry, I can't find any of the Tk interpreters ($wishes) in your path ($PATH) !*** Fix your path and/or install Tk8.0 or do a manual Install !_EOF1_ exit 1fiecho " -> Found your wish as '$WISH'"echo "Creating 'netplug' with correct wish..."( echo "#! $WISH" ; cat netplug.tcl ) > netplugchmod 755 netplugecho " -> done"BINDIR=`dirname $WISH`createdir $HOME/.netplug;cat << _EOF2_*** Good, now, Do you want a system or personal install ? + system install will put netplug executable with wish (in $BINDIR) and plugins in $plugdir/netplug + personal install will let you copy netplug executable where you want and will put plugins in your home dir .netplugSystem installation ? (default yes, enter 'n' for personal install)_EOF2_read answerif [ "$answer" = "n" ] ; then echo " -> personal install !" echo "Copying 'zero.dat' to your .netplug dir" mycp $HOME/.netplug zero.dat createdir $HOME/.netplug/plugins; echo "Copying all the plugins to ~/.netplug/plugins..." mycp $HOME/.netplug plugins/*.pli echo "Enter the 'netplug' destination directory (default $BINDIR)" read bindir if [ -z "$bindir" ] ; then bindir=$BINDIR; fi echo "Copying netplug to $bindir" mycp $bindir netplug else echo " -> system install !" createdir $plugdir; createdir $plugdir/netplug; createdir $plugdir/netplug/plugins; echo "Copying 'zero.dat' to the $plugdir/netplug dir" mycp $plugdir/netplug zero.dat echo "Copying all the plugins to the $plugdir/netplug/plugins dir" mycp $plugdir/netplug plugins/*.pli echo "Copying netplug to $BINDIR" mycp $BINDIR netplugficat << _EOF3_*** INSTALLATION COMPLETED SUCCESSFULLY ! CONGRATS !" (eventually 'rehash' and launch 'netplug' to check !)_EOF3_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -