Scripts/obs_mount.bash

24 lines
351 B
Bash
Executable File

#!/usr/bin/env bash
# Best practice options
set -o errexit
set -o nounset
set -o pipefail
if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi
if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then
echo 'Usage:
'
exit
fi
pushd ~
[ -d ~/sshfs/obs ] || mkdir -p ~/sshfs/obs
sshfs obs:/srv/salt ~/sshfs/obs
pushd ~/sshfs/obs
nvim
umount ~/sshfs/obs
popd
popd