All pastes #811034 Raw Edit

Someone

public shellscript v1 · immutable
·published 2007-12-10 15:42 UTC
rendered paste body
#!/bin/bashmountpoint="/media/player"deviceid="041e:4153"if mount | grep mtpfs > /dev/null; then    if fusermount -u "$mountpoint"; then        zenity --info --text "Player unmounted successfully."    else        zenity --error --text "Could not unmount, please close any open programs that are interfacing with the player."    fielse    if lsusb | grep "$deviceid" > /dev/null; then        if mtpfs "$mountpoint"; then            zenity --info --text "Player mounted successfully."        else            zenity --error --text "Could not mount, please make sure the player is connected properly."        fi    else            zenity --error --text "Could not find player with deviceid: $deviceid on the usb bus, check the cable."    fifi