aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/unmount_usb.sh
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-02-07 11:54:58 +0100
committerMateja <mail@matejamaric.com>2021-02-07 11:54:58 +0100
commitacf84fbee3389b0f83ced148ef08f996f81ca3d7 (patch)
treed8e5d0456f8b4abc61d0b2d2112e09d277871e7c /.local/bin/unmount_usb.sh
parentb477ab4923f88c90c655a9540ddafcc98ebdfd8c (diff)
downloaddotfiles-acf84fbee3389b0f83ced148ef08f996f81ca3d7.tar.gz
dotfiles-acf84fbee3389b0f83ced148ef08f996f81ca3d7.zip
Use `#!/usr/bin/env bash`
Diffstat (limited to '.local/bin/unmount_usb.sh')
-rwxr-xr-x.local/bin/unmount_usb.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/.local/bin/unmount_usb.sh b/.local/bin/unmount_usb.sh
index c90dde4..764365c 100755
--- a/.local/bin/unmount_usb.sh
+++ b/.local/bin/unmount_usb.sh
@@ -1,4 +1,5 @@
-#!/bin/bash
+#!/usr/bin/env bash
+
options=$(lsblk | grep /media/$USER | rev | cut -d ' ' -f 1 | rev)
[ -n "$options" ] && opt_num=$(echo "$options" | wc -l) || opt_num=0
if [ $opt_num == 0 ]; then