aboutsummaryrefslogtreecommitdiff
path: root/local/bin/elektroline00
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-06-08 22:01:23 +0200
committerKarel Kočí <cynerd@email.cz>2022-06-08 22:01:23 +0200
commit3c905d717a331b9be6d7036624378d0617234a82 (patch)
tree59e8aea77ace1b2e6bae66b02b28eebce7924a43 /local/bin/elektroline00
parentdf97cf3f26055928ed88b8be5f8251f55f1fcb79 (diff)
downloadmyconfigs-3c905d717a331b9be6d7036624378d0617234a82.tar.gz
myconfigs-3c905d717a331b9be6d7036624378d0617234a82.tar.bz2
myconfigs-3c905d717a331b9be6d7036624378d0617234a82.zip
Update i3blocks
Diffstat (limited to 'local/bin/elektroline00')
-rwxr-xr-xlocal/bin/elektroline0027
1 files changed, 27 insertions, 0 deletions
diff --git a/local/bin/elektroline00 b/local/bin/elektroline00
new file mode 100755
index 0000000..6ddbc0f
--- /dev/null
+++ b/local/bin/elektroline00
@@ -0,0 +1,27 @@
+#!/bin/bash
+path="/media/elektroline"
+
+usage() {
+ echo "Usage: $0 [OPTION].." >&2
+}
+
+umount="n"
+while getopts "u" opt; do
+ case "$opt" in
+ u)
+ umount="y"
+ ;;
+ *)
+ usage
+ exit 2
+ ;;
+ esac
+done
+
+if [ "$umount" = "n" ]; then
+ sudo mkdir -p "$path"/{company,elektro_doc}
+ sudo mount.cifs -o username=kkoci "//Elektroline00/company" "$path/company"
+ sudo mount.cifs -o username=kkoci "//Elektroline00/elektro_doc" "$path/elektro_doc"
+else
+ sudo umount "$path/company" "$path/elektro_doc"
+fi