This commit is contained in:
2018-10-05 00:29:25 +04:00
parent 68bec0b2d4
commit 1a780986b6
2 changed files with 29 additions and 1 deletions

View File

@@ -4,6 +4,30 @@ function is_local {
[[ "$HOSTNAME" =~ '^abra0' || "$HOSTNAME" == "svxf2-osx" ]]
}
function mount_sshfs {
FUNCTION_PRELUDE
if [[ ( -z $1 ) || ( -z $2 ) ]]; then
echo ':('
return 1
fi
local MOUNTPATH="/Users/abra/mount/$1"
mkdir -p "$MOUNTPATH"
umount "$MOUNTPATH" || true;
sshfs \
-o allow_other \
-o defer_permissions \
-o cache=yes \
-o Compression=no \
-o reconnect \
-o workaround=rename \
"$1:$2" "$MOUNTPATH"
}
function mkcd {
FUNCTION_PRELUDE_NO_XTRACE
@@ -216,4 +240,8 @@ function update_.g {
echo
zshreload
fi
}
function .sh_setup {
echo 'wget abra.me/.sh && chmod +x .sh && ./.sh'
}