From 6712ebfae9aca77dbc9a48db2867158ff2fd234c Mon Sep 17 00:00:00 2001 From: Marco Raber Date: Wed, 27 Apr 2022 20:08:16 +0200 Subject: [PATCH] made makefile --- setup.sh | 2 +- sshin | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index e37d764..8309879 100644 --- a/setup.sh +++ b/setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -[[ $(uname) = "Linux" ]] || grep "sshin" ~/.bashrc >/dev/null || echo "alias sshin=\"~/sshin/sshin\"" >> ~/.bashrc; echo "run \"source ~/.bashrc\"";exit +[[ $(uname) = "Linux" ]] && grep "sshin" ~/.bashrc >/dev/null || echo "alias sshin=\"~/gitclones/sshin/sshin\"" >> ~/.bashrc; echo "run \"source ~/.bashrc\"";exit PREFIX=~/.local/ mkdir $PREFIX/share/sshin diff --git a/sshin b/sshin index 58539ca..5a1739c 100755 --- a/sshin +++ b/sshin @@ -21,9 +21,11 @@ then command="${command}192.168.1.$1" else [[ $(uname) = "Linux" ]] && ports_file="$HOME/.local/share/sshin/port_association" || ports_file="$HOME/sshin/port_association" - port=$(grep $1 $ports_file | awk '{print $NF}') + port=$(grep $1 $ports_file | awk '{print $2}') command="${command}$1" [[ -n $port ]] && command="${command} -p $port" + dport=$(grep $1 $ports_file | awk '{print $NF}') + [[ -n $port ]] && command="${command} -D$dport" fi echo $command $command