kpod13

Untitled

Jun 15th, 2021
887
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env bash
  2.  
  3. MOUNT_PATH=/media/cdrom
  4.  
  5. if [[ ! -d "$MOUNT_PATH" ]]; then
  6.     echo "Please mount parallels tools disk before install"
  7.     exit
  8. fi
  9. echo "Copy install files to /tmp/parallels_fixed"
  10. cp -rf "$MOUNT_PATH" /tmp/parallels_fixed
  11. chmod -R 755 /tmp/parallels_fixed
  12. cd /tmp/parallels_fixed/kmods
  13. echo "Unpack prl_mod.tar.gz"
  14. tar -xzf prl_mod.tar.gz
  15. rm prl_mod.tar.gz
  16. echo "Patch prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c"
  17. sed '1i\#include <uapi/linux/mount.h>' -i prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c
  18. echo "Repack prl_mod.tar.gz"
  19. tar -zcvf prl_mod.tar.gz . dkms.conf Makefile.kmods > /dev/null
  20. cd /tmp/parallels_fixed
  21. echo "Start install"
  22. sudo ./install
  23. echo "Remove /tmp/parallels_fixed"
  24. rm -rf /tmp/parallels_fixed
RAW Paste Data