aboutsummaryrefslogtreecommitdiff
path: root/local/bin/elektroline00
diff options
context:
space:
mode:
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