-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
30 lines (27 loc) · 749 Bytes
/
install.sh
File metadata and controls
30 lines (27 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
if [ "$(id -u)" != "0" ]; then
echo "Run it as root"
echo
echo "usage: sudo bash install.sh --install | --uninstall"
else
if [ "$1" = "--install" ] ; then
if [ ! -d /usr/share/MACSwitcher ]; then
mkdir /usr/share/MACSwitcher
fi
cp install.sh /usr/share/MACSwitcher
cp macs.py /usr/share/MACSwitcher
cp macvendors.py /usr/share/MACSwitcher
cp bin/macs /usr/bin
chmod +x /usr/bin/macs
echo "MACSwitcher installed successfully"
elif [ "$1" = "--uninstall" ] ; then
if [ -d /usr/share/MACSwitcher ] ; then
rm -r /usr/share/MACSwitcher
fi
if [ -e /usr/bin/macs ] ; then
rm /usr/bin/macs
fi
echo "MACSwitcher uninstalled successfully"
else
echo "usage: bash install.sh --install | --uninstall"
fi
fi