closed-beta

This commit is contained in:
Bedir Tuğra Karaabalı 2025-02-28 02:23:11 +03:00
parent ec160f7ed9
commit 3a2e7674b6
2 changed files with 40 additions and 2 deletions

33
install.sh Executable file
View File

@ -0,0 +1,33 @@
#!/bin/bash
function setup() {
SOURCE_DIR="$(dirname "$(realpath "$0")")"
INSTALL_DIR="/usr/local/bin/$(basename "$SOURCE_DIR")"
echo $SOURCE_DIR
echo $INSTALL_DIR
ALIAS_NAME="allay" #the name
MAIN_SCRIPT="main.sh" #the script
SUB_FILES=$(for file in $(ls $SOURCE_DIR); do echo $file; done | grep -v $SCRIPT_NAME) #the sub files
echo "setting up..."
sudo mkdir -p $INSTALL_DIR
sudo cp -r "$SOURCE_DIR"/* "$INSTALL_DIR"
sudo chmod +x "$INSTALL_DIR/$MAIN_SCRIPT"
echo "alias $ALIAS_NAME=\"$INSTALL_DIR/$MAIN_SCRIPT\"" >> ~/.bashrc
source ~/.bashrc
echo "Kurulum tamamlandı! Artık '$ALIAS_NAME' komutunu her yerden çalıştırabilirsiniz."
echo "yetki veriliyor..."
sudo chmod +777 /usr/local/bin/ServerFinder/*
echo "yetki verildi!"
}
setup

7
main.sh Normal file → Executable file
View File

@ -1,8 +1,10 @@
#! usr/bin/bash
#!/usr/bin/bash
source finder.sh
source starter.sh
function main() {
result=$(find_server_files)
@ -13,3 +15,6 @@ function main() {
main