-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_macOS_frenamer.sh
executable file
·51 lines (45 loc) · 1.41 KB
/
install_macOS_frenamer.sh
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
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh -e
#Author: Jason Campisi
#Date: 6/20/2024
#version 0.2.7
#For macOS x or higher
#Released under the GPL v2 or higher
NAME="frenamer"
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;
# elif [ ! -e "$LOCATION$FILE" ]; then
# echo " Error - The location of '$LOCATION$FILE' does exist!!"
# exit 1;
fi
echo " ...found!";
echo " Setting file to executable...";
chmod +x ./$FILE
# 8.20.22 macOS12 this code now is not seeing it is installed... shell bug
# echo " Checking for Perl at /usr/bin/perl ...";
# if [ "$(whereis perl)" == '/usr/bin/perl' ]; then
# echo " ...Perl found!";
# else
# echo " Error: Perl can not be found.";
# echo " ->If it is installed, then make a symlink that points /usr/bin/perl to the right location, else please install it.";
# exit 1;
# fi
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