This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlinuxAIO
executable file
·93 lines (77 loc) · 3.74 KB
/
linuxAIO
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash
#
# 'linuxAIO' acts as the intermediary between the system Mewdeko is being hosted on and
# 'installer-prep'. To prevent any conflicts with updates to the installer, this script
# has as little code as deemed necessary.
#
# README: Because this script remains on the user's system, any changes to the code that
# are pushed to github, are never applied to the version on the user's system.
# To get around this, the variable $_LINUXAIO_REVISION contains a revision
# number that is updated every time any changes are made to 'linuxAIO'.
# Another variable in 'installer-prep' ($current_linuxAIO_revision) gets
# updated alongside with $_LINUXAIO_REVISION. Whenever the user executes the
# installer, 'installer-prep' will compare the two variables. If they are not
# of equal value, the newest version of 'linuxAIO' is retrieved from github.
#
########################################################################################
#### [ Variables ]
########################################################################################
#### [[ Configuration Variables ]]
#### Variables used to modify the behavior of the installer.
####
#### ~~~ THESE VARIABLES CAN BE MODIFIED BY THE END-USER ~~~
####
#### Whenever the installer retrieves the newest version of 'linuxAIO', all modified
#### variables, with the exception of $installer_repo, will be applied to the new
#### version of this script.
# The repository containing all of the scripts used by the installer.
#
# The only time that this variable should be modified, is if you have created a fork of
# the repo and plan on making your own modifications to the installer.
#
# Format: installer_repo="[github username]/[repository name]"
# Default: "StrangeRanger/Mewdeko-BashScript"
installer_repo="StrangeRanger/Mewdeko-BashScript"
# The branch of $installer_repo that the installer will download its scripts from.
#
# Options:
# main = Production ready code (the latest stable code)
# dev = Non-production ready code (has the possibility of breaking something)
#
# Default: "main"
installer_branch="main"
# The branch/tag, of Mewdeko's official repo, that the installer will download the bot
# from.
#
# IMPORTANT: Using a branch/tag containing code older than the one currently on your
# system, increases the likelihood of failed builds due to incompatible
# changes in the code/files coppied from the current to the newly downloaded
# version. For this, and other reasons, it's generally not recommended to
# to modify $_BOT_INSTALL_VERSION. This is especially true when it comes
# to a difference in major versions, such as v3 and v4.
#
# Options:
# main = Latest version (the master/main branch)
# x.x.x = Any other branch/tag (refer to the Mewdeko repo for available tags and
# branches)
#
# Default: "main"
export _BOT_INSTALL_VERSION="main"
#### End of [[ Configuration Variables ]]
########################################################################################
#### [[ General Variables ]]
# 'linuxAIO' revision number.
export _LINUXAIO_REVISION=4
# The URL to the raw code of a specified script.
export _RAW_URL="https://raw.githubusercontent.com/$installer_repo/$installer_branch"
#### End of [[ General Variables ]]
########################################################################################
#### End of [ Variables ]
########################################################################################
#### [ Main ]
echo "Downloading the latest installer..."
curl -O "$_RAW_URL"/installer-prep
sudo chmod +x installer-prep && ./installer-prep
exit "$?"
#### End of [ Main ]
########################################################################################