34 行
770 B
Bash
実行ファイル
34 行
770 B
Bash
実行ファイル
#!/bin/sh
|
|
SRVCNT=$(cat ~/.config/servers.txt | wc -l)
|
|
SERVERS=$(cat ~/.config/servers.txt)
|
|
|
|
export NEWT_COLORS="
|
|
root=,magenta
|
|
window=,black
|
|
shadow=,magenta
|
|
border=magenta,black
|
|
title=magenta,black
|
|
textbox=magenta,black
|
|
listbox=magenta,black
|
|
actlistbox=gray,brightmagenta
|
|
actsellistbox=black,magenta
|
|
label=magenta,black
|
|
compactbutton=magenta,black
|
|
button=black,magenta"
|
|
|
|
whiptail --menu "サーバーを選んで下さい" $(($SRVCNT+10)) 50 $SRVCNT $SERVERS 2> /tmp/contosrv.tmp.$$
|
|
RVAL=$(cat /tmp/contosrv.tmp.$$)
|
|
if [ "$RVAL" = "" ]; then
|
|
rm -f /tmp/contosrv.tmp.$$
|
|
clear
|
|
echo "キャンセル"
|
|
elif [ "$RVAL" = "#" ]; then
|
|
rm -f /tmp/contosrv.tmp.$$
|
|
clear
|
|
echo "これは選択出来ません。"
|
|
else
|
|
clear
|
|
ssh $RVAL
|
|
rm -f /tmp/contosrv.tmp.$$
|
|
fi
|