Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/mas6y6/CipherOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mas6y6 committed Dec 6, 2024
2 parents 1f010c1 + 057192c commit 57b95d8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
16 changes: 10 additions & 6 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ if [ "$RAW_ARCHITECTURE" = "x86_64" ]; then
ARCHITECTURE="x64"
elif [ "$RAW_ARCHITECTURE" = "aarch64" ]; then
ARCHITECTURE="arm64"
elif [ "$RAW_ARCHITECTURE" = "arm64" ]; then
ARCHITECTURE="arm64"
elif [ "$RAW_ARCHITECTURE" = "i386" ] || [ "$ARCHITECTURE" = "i686" ]; then
ARCHITECTURE="x32"
else
Expand All @@ -39,18 +41,20 @@ fi

if [ "$OS" = "Linux" ]; then
if [ "$ARCHITECTURE" = "x64" ]; then
GITHUB_REPO_URL="https://github.com/username/CipherOS/releases/latest/download/linux-x64-executeable"
GITHUB_REPO_URL="https://github.com/mas6y6/CipherOS/releases/latest/download/linux-x64-executeable"
elif [ "$ARCHITECTURE" = "arm64" ]; then
GITHUB_REPO_URL="https://github.com/username/CipherOS/releases/latest/download/linux-arm64-executeable"
GITHUB_REPO_URL="https://github.com/mas6y6/CipherOS/releases/latest/download/linux-arm64-executeable"
elif [ "$ARCHITECTURE" = "x32" ]; then
GITHUB_REPO_URL="https://github.com/username/CipherOS/releases/latest/download/linux-x32-executeable"
GITHUB_REPO_URL="https://github.com/mas6y6/CipherOS/releases/latest/download/linux-x32-executeable"
fi
INSTALL_DIR="/opt/cipheros"
elif [ "$OS" = "Darwin" ]; then
if [ "$ARCHITECTURE" = "x64" ]; then
GITHUB_REPO_URL="https://github.com/username/CipherOS/releases/latest/download/macos-x64-executeable"
GITHUB_REPO_URL="https://github.com/mas6y6/CipherOS/releases/latest/download/macos-x64-executeable"
elif [ "$ARCHITECTURE" = "arm64" ]; then
GITHUB_REPO_URL="https://github.com/username/CipherOS/releases/latest/download/macos-arm64-executeable"
GITHUB_REPO_URL="https://github.com/mas6y6/CipherOS/releases/latest/download/macos-arm64-executeable"
elif [ "$ARCHITECTURE" = "x32" ]; then
GITHUB_REPO_URL="https://github.com/mas6y6/CipherOS/releases/latest/download/macos-x32-executeable"
fi
INSTALL_DIR="/usr/local/cipheros"
else
Expand All @@ -60,7 +64,7 @@ fi
echo "\033[1;34mDownloading CipherOS executable...\033[0m"
mkdir -p "$INSTALL_DIR"

HTTP_STATUS=$(curl -s -o "$INSTALL_DIR/$EXECUTABLE" -w "%{http_code}" "$GITHUB_REPO_URL")
HTTP_STATUS=$(curl -L -s -o "$INSTALL_DIR/$EXECUTABLE" -w "%{http_code}" "$GITHUB_REPO_URL")

if [ "$HTTP_STATUS" -ne 200 ]; then
echo "\033[1;31mFailed to download CipherOS. HTTP Status: $HTTP_STATUS. Please check the URL or try again later.\033[0m"
Expand Down
10 changes: 5 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ def create_directories(path_list):
os.chdir(api.pwd)
elif platform.system() == "Linux":
if not debugmode:
api.starterdir = os.path.expanduser("~")
api.starterdir = os.path.join(os.path.expanduser("~"),"CipherOS")
elif platform.system() == "Darwin":
if not debugmode:
api.starterdir = os.path.expanduser("~")
api.starterdir = os.path.join(os.path.expanduser("~"),"CipherOS")

if executeargs.startdir:
api.starterdir = executeargs.startdir
Expand Down Expand Up @@ -579,7 +579,7 @@ def plugins(argsraw):
console.print("Reloading all plugins...")
for plugin_name in list(api.plugins):
api.disable_plugin(api.plugins[plugin_name])
for plugin_file in os.listdir(os.path.join(api.starterdir, "plugins")):
for plugin_file in os.listdir(os.path.join(api.starterdir,"CipherOS", "plugins")):
api.load_plugin(os.path.join(api.starterdir, "plugins", plugin_file))
console.print("Reload complete.")

Expand Down Expand Up @@ -817,8 +817,8 @@ def vdump(argsraw):
else:
console.print("Starting CipherOS")

if not len(os.listdir(os.path.join(api.starterdir, "plugins"))) == 0:
for i in os.listdir(os.path.join(api.starterdir, "plugins")):
if not len(os.listdir(os.path.join(api.starterdir,"CipherOS","plugins"))) == 0:
for i in os.listdir(os.path.join(api.starterdir,"CipherOS","plugins")):
try:
api.load_plugin(os.path.join(api.starterdir, "plugins", i))
except:
Expand Down

0 comments on commit 57b95d8

Please sign in to comment.