#!/bin/env bash # Mount multiples smb shares in a raw with the mount-share script # # Path to script MOUNTSCRIPT="/home/$USER/.local/bin/mount-share.sh" # Names of mounts to iterate over MOUNTS=("medias" "medias_uno" "medias_dos") # For verbose output VERB="Mounting" if [[ "$1" == "-u" ]];then UMOUNT=1 VERB="Unmounting" elif [[ "$1" != "" ]];then echo "Bad argument..." fi # Un/Mount mounts in $MOUNTS :) for mount in "${MOUNTS[@]}" do echo "$VERB $mount..." if [[ "$UMOUNT" == 1 ]];then "$MOUNTSCRIPT" "-u" "$mount" else "$MOUNTSCRIPT" "$mount" fi done exit 1