-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfpkg.installer
More file actions
59 lines (55 loc) · 1.69 KB
/
fpkg.installer
File metadata and controls
59 lines (55 loc) · 1.69 KB
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
52
53
54
55
56
57
58
59
#!/usr/bin/env bash
#check for root
if [ "$EUID" -ne 0 ]; then
echo "Yue gon need root for this dumbass."
exit 1
fi
#define exit_with_error
function exit_with_error() {
echo " !! Error !! $1"
echo " !! Abort !! "
exit 1
}
#check for bash 5
if ((BASH_VERSIONINFO[0] < 5)); then
exit_with_error "You need Bash 5+ to run FPKG! :("
fi
#startup
echo "FPKG Installer v0.1-r1 by sudQ#2328"
sleep 0.5
echo " "
if [[ -f /usr/bin/fpkg ]]; then
echo "FPKG is already installed, so we aint gonna do jack shit."
else
read -rp "Are you sure you want to install FPKG (v0.1-r2) ? [yes/no] " reply
case "$reply" in
[yY][eE][sS])
fpkginstall
;;
[nN][oO])
noinst
;;
esac
fi
#install function
function fpkginstall() {
echo "!! K then, we gon download some shit."
cd /tmp/fpkg-dl
wget -t=10 https://raw.githubusercontent.com/FRUE-Project/fpkg/main/fpkg >/dev/null 2>&1 || exit_with_error "Couldn't download FPKG, try again some other time."
sleep 0.5
echo ":: Finished coppin' them files, installin' now"
mv /tmp/fpkg-dl/fpkg /usr/bin || exit_with_error "!! Err
or !! Couldn't move files."
chmod +x /usr/bin/fpkg || exit_with_error "Could not docter/fix up files, my bad."
mkdir -p /home/FPKG || exit_with_error "Could not create /home/FPKG , my bad."
if [[ -f /usr/bin/fpkg ]]; then
echo "!! Installation completed, enjoy usin' FPKG!!111 :)"
fi
}
#don't install function
function noinst() {
echo "!! K then, ain't gonna install, don't know why you ran this but ok. Exitin'."
exit 1
}
fi
exit 1