• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3# Script to uninstall GPT fdisk from OS X
4
5OSName=`uname -s`
6if [[ $OSName != 'Darwin' ]] ; then
7    echo "This script is useful only under OS X! Exiting!"
8    exit 1
9fi
10
11# Remove from pre-1.0.1 locations
12rm -f /usr/sbin/gdisk
13rm -f /usr/sbin/sgdisk
14rm -f /usr/sbin/cgdisk
15rm -rf /usr/share/doc/gdisk/
16rm -f /usr/share/man/man8/gdisk.8
17rm -f /usr/share/man/man8/sgdisk.8
18rm -f /usr/share/man/man8/cgdisk.8
19
20# Remove from 1.0.1 (and later) locations
21rm -f /usr/local/bin/gdisk
22rm -f /usr/local/bin/sgdisk
23rm -f /usr/local/bin/cgdisk
24rm -rf /usr/local/doc/gdisk
25rm -f /usr/local/man/man8/gdisk.8
26rm -f /usr/local/man/man8/sgdisk.8
27rm -f /usr/local/man/man8/cgdisk.8
28
29echo "All GPT fdisk program files successfully removed!"
30
31# And finally, erase this script itself....
32rm -f /usr/local/bin/uninstall-gdisk
33