aboutsummaryrefslogtreecommitdiff
path: root/local/bin/elektroline00
blob: b06ae4e4709ca9f1ddabc206096dd93ebeed74c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env 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,czelldata}
	sudo mount.cifs -o username=kkoci "//Elektroline00/company" "$path/company"
	sudo mount.cifs -o username=kkoci "//Elektroline00/elektro_doc" "$path/elektro_doc"
	sudo mount.cifs -o username=kkoci "//czelldata/Share" "$path/czelldata"
else
	sudo umount "$path/company" "$path/elektro_doc"
fi