diff options
author | David Runge <dave@sleepmap.de> | 2016-08-17 15:18:11 +0200 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2016-08-17 15:18:11 +0200 |
commit | 2a689d88fd8727536d6e1221b6e25436bc5acc74 (patch) | |
tree | 2741dd930da2c6ed094851a489a7023ca578c00c | |
parent | 250114313db0f8bcfb82cadc71569656da9a56d1 (diff) | |
parent | 5398090beb583efb86717010f90ebdf2552c4b94 (diff) | |
download | dotfiles-2a689d88fd8727536d6e1221b6e25436bc5acc74.tar.gz dotfiles-2a689d88fd8727536d6e1221b6e25436bc5acc74.tar.bz2 dotfiles-2a689d88fd8727536d6e1221b6e25436bc5acc74.tar.xz dotfiles-2a689d88fd8727536d6e1221b6e25436bc5acc74.zip |
Merge branch 'master' of sleepmap.de:config/dotfiles
* 'master' of sleepmap.de:config/dotfiles:
.zsh.after/functions.zsh: Extending lopen function for apu-serve. Changing exits into returns.
-rw-r--r-- | .zsh.after/functions.zsh | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/.zsh.after/functions.zsh b/.zsh.after/functions.zsh index 7908f71..da7cda4 100644 --- a/.zsh.after/functions.zsh +++ b/.zsh.after/functions.zsh @@ -270,7 +270,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 @@ -281,7 +281,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") @@ -293,7 +293,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") @@ -303,7 +303,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") @@ -315,7 +315,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") @@ -325,7 +325,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") @@ -335,12 +335,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 @@ -355,7 +355,7 @@ lopen() { fi else echo "Error: Device /dev/mapper/$1 is not available." - exit 1 + return 1 fi } @@ -377,6 +377,7 @@ lclose() { fi else echo "/mnt/$1 is not a mountpoint or not mounted." + return 1 fi } |