From 3c905d717a331b9be6d7036624378d0617234a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 8 Jun 2022 22:01:23 +0200 Subject: Update i3blocks --- local/bin/elektroline00 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 local/bin/elektroline00 (limited to 'local/bin') 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 -- cgit v1.2.3