-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_macOS_k.sh
More file actions
executable file
·39 lines (33 loc) · 905 Bytes
/
install_macOS_k.sh
File metadata and controls
executable file
·39 lines (33 loc) · 905 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
31
32
33
34
35
36
37
38
39
#!/bin/sh -e
#Author: Jason Campisi
#Date: 7/17/2024
#version 0.2.8
#For macOS x or higher
#Released under the GPL v2 or higher
NAME="k"
EXT="pl"
FILE="$NAME.$EXT"
LOCATION="/opt/local/bin/"
echo "$FILE installer:";
echo " Checking if '$FILE' exists in the current folder..."
if [ ! -n "$FILE" ]; then
echo " Error - Filename is not set!"
exit 1;
fi
echo " ...found!";
echo " Setting file to executable...";
chmod +x ./$FILE
echo " Checking if you have the clearance to install this ...";
if [ "$(whoami)" != 'root' ]; then
echo " You do not have permission to install ./$FILE";
echo " ->You must be a root user.";
echo " ->Try instead: sudo $0";
exit 1;
else
echo " Root access granted for $0";
fi
echo " Installing $NAME to $LOCATION ...";
cp -rf ./$FILE $LOCATION$NAME
echo " Setup complete."
echo "Testing install with this command\n>$NAME --version";
$NAME --version