dotfiles

regexghost dotfiles and scripts
git clone https://git.regexghost.com/dotfiles.git
Log | Files | Refs | README

iphone-mount.sh (1589B)


      1 #!/usr/bin/env bash
      2 
      3 MOUNTPOINT="$HOME/Downloads/USBDrive"
      4 
      5 # This is a horrible script and I need to re-write it to dynamically get all these apps
      6 # and present using fzf
      7 
      8 if [[ "$1" == "mount" ]]; then
      9 	idevicepair validate
     10 	idevicepair pair || exit
     11 	ifuse "$MOUNTPOINT"
     12 elif [[ "$1" == "fbmount" ]]; then
     13 	idevicepair validate
     14 	idevicepair pair || exit
     15 	ifuse --documents com.foobar2000.mobile "$MOUNTPOINT"
     16 elif [[ "$1" == "vlcmount" ]]; then
     17 	idevicepair validate
     18 	idevicepair pair || exit
     19 	ifuse --documents org.videolan.vlc-ios "$MOUNTPOINT"
     20 elif [[ "$1" == "infusemount" ]]; then
     21 	idevicepair validate
     22 	idevicepair pair || exit
     23 	ifuse --documents com.firecore.infuse "$MOUNTPOINT"
     24 elif [[ "$1" == "pdfmount" ]]; then
     25 	idevicepair validate
     26 	idevicepair pair || exit
     27 	ifuse --documents com.pspdfkit.viewer "$MOUNTPOINT"
     28 elif [[ "$1" == "readeramount" ]]; then
     29 	idevicepair validate
     30 	idevicepair pair || exit
     31 	ifuse --documents org.readera.book-reader "$MOUNTPOINT"
     32 elif [[ "$1" == "ashellmount" ]]; then
     33 	idevicepair validate
     34 	idevicepair pair || exit
     35 	ifuse --documents AsheKube.app.a-Shell "$MOUNTPOINT"
     36 elif [[ "$1" == "pocketbookmount" ]]; then
     37 	idevicepair validate
     38 	idevicepair pair || exit
     39 	ifuse --documents com.obreey.reader "$MOUNTPOINT"
     40 elif [[ "$1" == "comicbookreadermount" ]]; then
     41 	idevicepair validate
     42 	idevicepair pair || exit
     43 	ifuse --documents com.realvirtuality.Comic-Book-Reader "$MOUNTPOINT"
     44 elif [[ "$1" == "unmount" ]] || [[ "$1" == "umount" ]]; then
     45 	fusermount -u "$MOUNTPOINT"
     46 elif [[ "$1" == "force" ]]; then
     47 	fusermount -uz "$MOUNTPOINT"
     48 fi
     49 
     50 echo "Done"