summaryrefslogtreecommitdiff
path: root/bin/common/amount
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-07-19 11:35:58 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-07-19 11:35:58 +0200
commita4011543565cb769d82b5ef3ac9bda7a5298f14c (patch)
treee73dd79a88434cf2992e9cee57fe6201f629d79a /bin/common/amount
parentca93eb95d535e30207aba84982475fbd9749d933 (diff)
replaced amount with aumount
Diffstat (limited to 'bin/common/amount')
-rwxr-xr-xbin/common/amount38
1 files changed, 0 insertions, 38 deletions
diff --git a/bin/common/amount b/bin/common/amount
deleted file mode 100755
index 9053b62..0000000
--- a/bin/common/amount
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-tmp="$(mktemp)"
-
-die ()
-{
- echo "$1" >&2
-}
-
-clear
-lsblk -o name,size,type,mountpoint
-die "───────────────────────────────────"
-lsblk --ascii -o name,mountpoint |
- grep '^.-' |
- while read line
-do
- words="$(printf "$line" | wc -w)"
- test $words -gt 1 && continue
- i=$((${i:-0}+1))
- printf "%s. %s\n" "$i" "$(printf "$line" | cut -f 2- -d '-')"
-done | tee "$tmp"
-
-read -p '>' choice
-
-dev="$(grep "^$choice\." "$tmp" | cut -f 2- -d ' ')"
-if test -n "$dev"
-then
- die "mounting /dev/$dev on /media/$dev"
- test "$(id -u)" != "0" && sudo="sudo"
- mkdir -p /media/$dev
- $sudo mount /dev/$dev /media/$dev > /dev/null 2>&1 &&
- die 'Mounted succesfully.' ||
- die 'Failed to mount.'
- die 'Press [Enter] to continue.'
- head -n 1 > /dev/null
-fi
-
-rm -f "$tmp"