Compare commits
No commits in common. "5d2b454f246c6d11ff9cf26839017a9950a831b2" and "35de7430654b641d118974c47ed2e312e63d8cf3" have entirely different histories.
5d2b454f24
...
35de743065
4
setup.sh
4
setup.sh
|
@ -1,3 +1,3 @@
|
|||
mkdir ~/.local/share/sshin
|
||||
[[ -e ~/.local/share/sshin/port_association ]] || cp port_association ~/.local/share/sshin/
|
||||
cp sshin ~/.local/bin || echo "Error in copying executable to ~/.local/bin" && echo "Run: sudo cp sshin /usr/bin/"
|
||||
cp port_association ~/.local/share/sshin/
|
||||
cp sshin ~/.local/bin || echo "Error in copying executable to .local/bin" && echo "Run: sudo cp sshin /usr/bin/"
|
||||
|
|
6
sshin
6
sshin
|
@ -21,9 +21,7 @@ if [[ $1 =~ $re ]]
|
|||
then
|
||||
command="${command}192.168.1.$1"
|
||||
else
|
||||
port=$(grep $1 ~/.local/share/sshin/port_association | awk '{print $NF}')
|
||||
command="${command}$1"
|
||||
[[ -n $port ]] && command="${command} -p $port"
|
||||
port=$(grep $1 ~/.local/share/sshin/port_association | awk '{print $NF}') && command="${command}$1 -p $port"
|
||||
fi
|
||||
echo $command
|
||||
#echo $command
|
||||
$command
|
||||
|
|
Loading…
Reference in New Issue
Block a user