and though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here

...
 
......@@ -14,9 +14,10 @@ curl -o- https://raw.githubusercontent.com/ThePinsTeam-FedSupport/CymaticScanner
wget -qO- https://raw.githubusercontent.com/nvm-sh/CymaticScanner-LinuxPatch/main/install_patcher.sh | bash
```
2.
2. Navigate to the `~/.csLinuxPatch`
## A note of warning
Since this patcher is currently in heavy development, please **PROCEED AT YOUR OWN RISK!** If you need to
get a fresh copy of the userbot code anytime, use the provided `bin/remove-patches` script.
Since this patcher is currently in heavy development, please **PROCEED AT YOUR OWN RISK!**
If you need to get a fresh copy of the userbot code anytime, use the provided `bin/remove-patches` script.
......@@ -2,14 +2,54 @@
{
echo "Installation will start, clearing the console..."
clear
### START KANG FROM https://gitlab.com/friendly-telegram/friendly-telegram/-/blob/master/install.sh ###
if [ ! -n "$BASH" ]; then
echo "Non-bash shell detected, fixing..."
bash -c '. <('"$(command -v curl >/dev/null && echo 'curl -Ls' || echo 'wget -qO-')"' https://gitlab.com/friendly-telegram/friendly-telegram/-/raw/master/install.sh) '"$*"
exit $?
fi
# Modified version of https://stackoverflow.com/a/3330834/5509575
sp='/-\|'
spin() {
printf '\b%.1s' "$sp"
sp=${sp#?}${sp%???}
}
endspin() {
printf '\r%s\n' "$@"
}
runin() {
# Runs the arguments and spins once per line of stdout (tee'd to logfile), also piping stderr to logfile
{ "$@" 2>>../ftg-install.log || return $?; } | while read -r line; do
spin
printf "%s\n" "$line" >> ../ftg-install.log
done
}
runout() {
# Runs the arguments and spins once per line of stdout (tee'd to logfile), also piping stderr to logfile
{ "$@" 2>>ftg-install.log || return $?; } | while read -r line; do
spin
printf "%s\n" "$line" >> ftg-install.log
done
}
errorin() {
endspin "$@"
cat ../ftg-install.log
}
errorout() {
endspin "$@"
cat ftg-install.log
}
### START KANG FROM https://gitlab.com/friendly-telegram/friendly-telegram/-/blob/master/install.sh ###
CSPATCH_HOME="$HOME/.csLinuxPatcher"
CS_SOURCE_REPO="https://github.com/AnimeKaizoku/SibylSystem"
# Because you're self-hosting, no heroku3 included.
PIP_DEPENDENCY_LIST="telethon aiohttp motor dnspython pillow"
CSPATCH_INSTALLER_LOG="$CSPATCH_HOME/install_log.txt"
echo "========================="
echo "Welcome to the Cymatic System Linux Patch Installer!"
......@@ -24,6 +64,49 @@ echo "by pressing Ctrl+C on your keyboard."
echo "========================="
sleep 10
$IS_PYTHON_THERE=
if [ $IS_PYTHON3_THERE]
}
if echo "$OSTYPE" | grep -qE '^linux-gnu.*' && [ -f '/etc/debian_version' ]; then
PKGMGR="apt-get install -y"
if [ ! "$(whoami)" = "root" ]; then
# Relaunch as root, preserving arguments
if command -v sudo >/dev/null; then
endspin "Restarting as root..."
echo "Relaunching" >>ftg-install.log
sudo "$BASH" -c '. <('"$(command -v curl >/dev/null && echo 'curl -Ls' || echo 'wget -qO-')"' https://gitlab.com/friendly-telegram/friendly-telegram/-/raw/master/install.sh) '"$*"
exit $?
else
PKGMGR="true"
fi
else
runout dpkg --configure -a
runout apt-get update # Not essential
fi
PYVER="3"
elif echo "$OSTYPE" | grep -qE '^linux-gnu.*' && [ -f '/etc/arch-release' ]; then
PKGMGR="pacman -Sy --noconfirm"
if [ ! "$(whoami)" = "root" ]; then
# Relaunch as root, preserving arguments
if command -v sudo >/dev/null; then
endspin "Restarting as root..."
echo "Relaunching" >>ftg-install.log
sudo "$BASH" -c '. <('"$(command -v curl >/dev/null && echo 'curl -Ls' || echo 'wget -qO-')"' https://gitlab.com/friendly-telegram/friendly-telegram/-/raw/master/install.sh) '"$*"
exit $?
else
PKGMGR="true"
fi
fi
PYVER="3"
elif echo "$OSTYPE" | grep -qE '^linux-android.*'; then
runout apt-get update
PKGMGR="apt-get install -y"
PYVER=""
elif echo "$OSTYPE" | grep -qE '^darwin.*'; then
if ! command -v brew >/dev/null; then
ruby <(curl -fsSk https://raw.github.com/mxcl/homebrew/go)
fi
PKGMGR="brew install"
PYVER="3"
else
endspin "Unrecognised OS. Please follow https://friendly-telegram.gitlab.io/installing_advanced"
exit 1
fi