simplified finding the home dir
This commit is contained in:
parent
3820ea0297
commit
34baf7e029
@ -2,13 +2,12 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
sshMount () {
|
sshMount () {
|
||||||
clientUser=$(whoami);
|
|
||||||
serverUser=$1;
|
serverUser=$1;
|
||||||
serverHost=$2;
|
serverHost=$2;
|
||||||
shift 2;
|
shift 2;
|
||||||
args=($@)
|
args=($@)
|
||||||
for ((i=0; i < ${#args[@]}; i=i + 2)); do
|
for ((i=0; i < ${#args[@]}; i=i + 2)); do
|
||||||
sshfs ${serverUser}@${serverHost}:/citadel/${args[$i]}/ /home/${clientUser}/${args[$i + 1]}/ -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=8
|
sshfs ${serverUser}@${serverHost}:/citadel/${args[$i]}/ $HOME/${args[$i + 1]}/ -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=8
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user