#!/bin/bash
#########################################################
# 							#
# This is BashStyle-NG  				#
#							#
# Licensed under GNU GENERAL PUBLIC LICENSE v3    	#
#							#
# Copyright 2007 - 2016 Christopher Bratusek		#
#							#
#########################################################

case ${1} in

	--help | -h | "")
		bsng-help -a "Christopher Roy Bratusek" -e "nano@jpberlin.de" -h "http://www.nanolx.org/"\
			-l "GNU GPL v3" -n "remount" -s "remount device with extra options" -v "${BSNG_VERSION}" -y "${BSNG_YEAR}"\
			-o "device:|device to remount"\
			-o "options:|additional mount options"
	;;

	* )
		DEVICE="${1}"
		shift
		OPTS=$(mount | grep ${DEVICE} | sed -e 's/.*(//g' -e  's/)//g')
		mount -oremount,"${OPTS}","${@}" "${DEVICE}"
	;;

esac
