made makefile
This commit is contained in:
parent
76a35b8301
commit
6712ebfae9
2
setup.sh
2
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
|
||||
|
|
4
sshin
4
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user