simplified finding the home dir

This commit is contained in:
fabian 2024-01-18 15:50:34 +01:00
parent 3820ea0297
commit 34baf7e029

View File

@ -2,13 +2,12 @@
set -euo pipefail
sshMount () {
clientUser=$(whoami);
serverUser=$1;
serverHost=$2;
shift 2;
args=($@)
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
}