Browse Source

sshfs: add sshfs shortcuts

Signed-off-by: Alejandro Mery <amery@geeks.cl>
master
Alejandro Mery 11 years ago
parent
commit
5d7ae4f7fa
3 changed files with 25 additions and 0 deletions
  1. +1
    -0
      files/bin/sshfs_builder
  2. +1
    -0
      files/bin/sshfs_inmep
  3. +23
    -0
      lib/sshfs_wrapper.sh

+ 1
- 0
files/bin/sshfs_builder

@ -0,0 +1 @@
../../lib/sshfs_wrapper.sh

+ 1
- 0
files/bin/sshfs_inmep

@ -0,0 +1 @@
../../lib/sshfs_wrapper.sh

+ 23
- 0
lib/sshfs_wrapper.sh

@ -0,0 +1,23 @@
#!/bin/sh
set -e
N="$(basename "$0")"
N="${N#sshfs_}"
case "$N" in
inmep)
R=amery@inmep.geeks.cl:projects/
;;
builder)
R=amery@geeks.cl:projects/
;;
*)
echo "$0: invalid name" >&2
exit 1
;;
esac
D="/media/$USER/$N"
if [ ! -d "$D/" ]; then
sudo mkdir -p "$D"
sudo chown $USER:$USER "$D"
fi
exec sshfs "$R" "$D"

Loading…
Cancel
Save