2025-01-30 19:55:16 -06:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# This script opens supported locations in my server by appropriately changing the
|
|
|
|
# mount locations for it to work over ssh.
|
|
|
|
|
|
|
|
ROOTDIR="$(echo $PWD | cut -d/ -f-2,3)"
|
|
|
|
|
|
|
|
if [ "$ROOTDIR" == "/mnt/server" ]; then
|
2025-01-31 01:41:37 -06:00
|
|
|
ssh -t server-ts-rsync "cd \"/mnt/storage/$(echo $PWD | cut -d/ -f4-)\"; fish -l"
|
2025-01-30 19:55:16 -06:00
|
|
|
elif [[ "$ROOTDIR" == "/tank1/personal" || "$ROOTDIR" == "/tank1/media" ]]; then
|
2025-01-31 01:41:37 -06:00
|
|
|
ssh -t server-ts-rsync "cd \"$PWD\"; fish -l"
|
2025-01-30 19:55:16 -06:00
|
|
|
else
|
|
|
|
echo "Unsupported directory."
|
|
|
|
echo "Only /mnt/server/*, /tank1/* are supported."
|
|
|
|
fi
|
|
|
|
|