Skip to content

Commit 470a56d

Browse files
authored
Add Unix installer.
1 parent e7b1ff9 commit 470a56d

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

installer/unix_installer.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
set -e
4+
script_runner=$(whoami)
5+
exec_path="/usr/local/bin/"
6+
exec_name="pfox"
7+
exec_full_path="${exec_path}${exec_name}"
8+
binary_download_url="https://github.com/diegomacario/PoorFox2/releases/download/1/pfox"
9+
10+
control_c()
11+
{
12+
echo -en "\n\n*** Exiting ***\n\n"
13+
exit 1
14+
}
15+
16+
trap control_c SIGINT
17+
18+
echo -e "\n"
19+
echo "############################"
20+
echo "#### Poor Fox Installer ####"
21+
echo "############################"
22+
23+
# check if user is root
24+
if [ $script_runner != "root" ] ; then
25+
echo -e "\nError: You must execute this script as a normal user with sudo privileges.\n"
26+
exit 1
27+
fi
28+
29+
echo -e "\nThis script will simply download the binary for Poor Fox and place it under $exec_path\n"
30+
curl -L $binary_download_url -o $exec_name && sudo mv $exec_name $exec_path && chmod +x $exec_full_path
31+
32+
echo -e "\nSuccessfully installed Poor Fox.\n"

0 commit comments

Comments
 (0)