You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
922 B
23 lines
922 B
#!/bin/bash
|
|
|
|
##############################################################################
|
|
#
|
|
# isobash
|
|
# By Steven Saus
|
|
# (c) 2022; licensed under the MIT license
|
|
#
|
|
# Because I needed something to remember how to mount isos
|
|
##############################################################################
|
|
|
|
#get install directory
|
|
export SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
|
|
|
|
IsoFile=$(zenity --file-selection --file-filter=*.iso --title="Choose your ISO file to mount")
|
|
MountDir=$(zenity --file-selection --directory --title="Where shall we mount it?")
|
|
|
|
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY mount ${IsoFile} ${MountDir} -o loop
|
|
|
|
# Pauses; leaves reminder to unmount whenever it's closed
|
|
zenity --progress --title="Mounted ISO" --text="Mounted \n${IsoFile}\n at ${MountDir}" --pulsate --cancel-label="Click me to unmount"
|
|
|
|
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY umount "${MountDir}"
|
|
|