aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2016-08-16 16:04:50 +0200
committerDavid Runge <dave@sleepmap.de>2016-08-16 16:04:50 +0200
commita24212e200da85e91c20d3f7c6631a19b4bab04f (patch)
treeb146e35c61ba1ed44801bb55b42aa30739612267
parentaa87eb49efac07cad54b08c9d74540a90807511f (diff)
downloaddotfiles-a24212e200da85e91c20d3f7c6631a19b4bab04f.tar.gz
dotfiles-a24212e200da85e91c20d3f7c6631a19b4bab04f.tar.bz2
dotfiles-a24212e200da85e91c20d3f7c6631a19b4bab04f.tar.xz
dotfiles-a24212e200da85e91c20d3f7c6631a19b4bab04f.zip
.zsh.after/functions.zsh: Extending lopen function for apu-serve. Changing exits into returns.
-rw-r--r--.zsh.after/functions.zsh19
1 files changed, 10 insertions, 9 deletions
diff --git a/.zsh.after/functions.zsh b/.zsh.after/functions.zsh
index c9ea095..f336e50 100644
--- a/.zsh.after/functions.zsh
+++ b/.zsh.after/functions.zsh
@@ -266,7 +266,7 @@ lopen() {
;;
esac
;;
- "dvzrv" | "trvlr")
+ "dvzrv" | "trvlr" | "apu-serve")
case $1 in
"music")
if [ -L "/dev/disk/by-uuid/e0b19c7d-9e90-4117-aea1-7e4b321d9d5a" ]; then
@@ -277,7 +277,7 @@ lopen() {
sudo cryptsetup luksOpen "/dev/disk/by-id/usb-Seagate_FreeAgent_Go_2GE36KXD-0:0" $1
else
echo "Error! Device $1 is not available"
- exit 1
+ return 1
fi
;;
"photos")
@@ -289,7 +289,7 @@ lopen() {
sudo cryptsetup luksOpen "/dev/disk/by-id/usb-Seagate_FreeAgent_Go_2GE4LCR0-0:0" $1
else
echo "Error! Device $1 is not available"
- exit 1
+ return 1
fi
;;
"backup-audio")
@@ -299,7 +299,7 @@ lopen() {
sudo cryptsetup luksOpen "/dev/disk/by-id/ata-HGST_HTS725050A7E630_TF755AWHHS9S1M" $1
else
echo "Error! Device $1 is not available"
- exit 1
+ return 1
fi
;;
"backup")
@@ -311,7 +311,7 @@ lopen() {
sudo cryptsetup luksOpen "/dev/disk/by-id/usb-ST950042_0ASG_55DFFFFFFFFF-0:0" $1
else
echo "Error! Device $1 is not available"
- exit 1
+ return 1
fi
;;
"media")
@@ -321,7 +321,7 @@ lopen() {
sudo cryptsetup luksOpen "/dev/disk/by-uuid/e5adbc14-732e-43e8-b6e1-febdfe6d1d3c" $1
else
echo "Error! Device $1 is not available"
- exit 1
+ return 1
fi
;;
"video")
@@ -331,12 +331,12 @@ lopen() {
sudo cryptsetup luksOpen "/dev/disk/by-uuid/5ac700be-e168-495b-b133-42064fa101e4" $1
else
echo "Error! Device $1 is not available"
- exit 1
+ return 1
fi
;;
*)
echo "Error! Device $1 is not available"
- exit 1
+ return 1
;;
esac
esac
@@ -351,7 +351,7 @@ lopen() {
fi
else
echo "Error: Device /dev/mapper/$1 is not available."
- exit 1
+ return 1
fi
}
@@ -373,6 +373,7 @@ lclose() {
fi
else
echo "/mnt/$1 is not a mountpoint or not mounted."
+ return 1
fi
}