完了だ
このコミットが含まれているのは:
コミット
f375704067
|
@ -1 +0,0 @@
|
||||||
servers.txt
|
|
|
@ -6,7 +6,7 @@ Used to be サーバーを選択するのは easy
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mkdir -p ~/.config/sshpick ~/.local/bin
|
mkdir -p ~/.config/sshpick ~/.local/bin
|
||||||
cp servers.example.txt ~/.config/servers.txt
|
cp *.txt ~/.config/sshpick
|
||||||
cp sshpick ~/.local/bin && chmod +x ~/.local/bin/sshpick
|
cp sshpick ~/.local/bin && chmod +x ~/.local/bin/sshpick
|
||||||
echo "export PATH=$PATH:~/.local/bin" >> ~/.xprofile && source ~/.xprofile
|
echo "export PATH=$PATH:~/.local/bin" >> ~/.xprofile && source ~/.xprofile
|
||||||
```
|
```
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
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
|
29
sshpick
29
sshpick
|
@ -1,33 +1,22 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
SRVCNT=$(cat ~/.config/servers.txt | wc -l)
|
SERVERS=$(cat ~/.config/sshpick/servers.txt)
|
||||||
SERVERS=$(cat ~/.config/servers.txt)
|
SRVCNT=$($SERVERS | wc -l)
|
||||||
|
TMPFILE=/tmp/contosrv.tmp.$$
|
||||||
|
|
||||||
export NEWT_COLORS="
|
export NEWT_COLORS=$(cat ~/.config/sshpick/colors.txt)
|
||||||
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.$$
|
whiptail --menu "サーバーを選んで下さい" $(($SRVCNT+10)) 50 $SRVCNT $SERVERS 2> $TMPFILE
|
||||||
RVAL=$(cat /tmp/contosrv.tmp.$$)
|
RVAL=$(cat $TMPFILE)
|
||||||
if [ "$RVAL" = "" ]; then
|
if [ "$RVAL" = "" ]; then
|
||||||
rm -f /tmp/contosrv.tmp.$$
|
rm -f $TMPFILE
|
||||||
clear
|
clear
|
||||||
echo "キャンセル"
|
echo "キャンセル"
|
||||||
elif [ "$RVAL" = "#" ]; then
|
elif [ "$RVAL" = "#" ]; then
|
||||||
rm -f /tmp/contosrv.tmp.$$
|
rm -f $TMPFILE
|
||||||
clear
|
clear
|
||||||
echo "これは選択出来ません。"
|
echo "これは選択出来ません。"
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
ssh $RVAL
|
ssh $RVAL
|
||||||
rm -f /tmp/contosrv.tmp.$$
|
rm -f $TMPFILE
|
||||||
fi
|
fi
|
||||||
|
|
読み込み中…
新しいイシューから参照