From 0467b2f659d53fd029976ab94ba2b2cd2aec92ac Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Fri, 23 Apr 2021 18:59:31 +0200 Subject: [PATCH] :sparkles: curl setup.bat --- scripts/setup/README.md | 16 +++++++++++--- scripts/setup/setup.bat | 47 ++++++++++++++++++++++------------------- 2 files changed, 38 insertions(+), 25 deletions(-) diff --git a/scripts/setup/README.md b/scripts/setup/README.md index f287bdb..91ddd47 100644 --- a/scripts/setup/README.md +++ b/scripts/setup/README.md @@ -1,14 +1,24 @@ ## Getting Started + ### Windows -Just double click setup.bat + +open cmd and enter this to clone and setup all repositories + +``` +curl https://github.com/fosscord/fosscord/tree/main/scripts/setup --output test.bat && test.bat +``` ### Linux/MacOS + to execute the setup script you need to grant execution permission (+x). -To do that open your terminal and navigate to this directory ``setup/`` and enter this: +To do that open your terminal and navigate to this directory `setup/` and enter this: + ``` chmod +x setup.sh ``` + and then execute by double clicking or entering this in the terminal: + ``` ./setup.sh -``` \ No newline at end of file +``` diff --git a/scripts/setup/setup.bat b/scripts/setup/setup.bat index 9d7fc44..3e72dc5 100644 --- a/scripts/setup/setup.bat +++ b/scripts/setup/setup.bat @@ -1,6 +1,5 @@ @ECHO off ECHO. -color 3 type fosscord.txt ECHO. ECHO This will clone and setup all fosscord repositories, @@ -8,14 +7,14 @@ ECHO if you only want to work on one specific repository ECHO follow their specific "Getting Started" Guide and exit this script ECHO. CHOICE /C YN /m "Are you sure you want to continue (y/n)?" -IF %ERRORLEVEL% == 2 GOTO :end1 +IF %ERRORLEVEL% == 2 GOTO :end where /q git IF ERRORLEVEL 1 ( ECHO Error: git is not installed. ECHO Please Install git from: https://git-scm.com/downloads ECHO And make sure its in the path - GOTO :endrpc + GOTO :end ) where /q node @@ -23,7 +22,7 @@ IF ERRORLEVEL 1 ( ECHO Error: node is not installed. ECHO Please Install NodeJS from: https://nodejs.org/en/download/ ECHO And make sure its in the path - GOTO :endrpc + GOTO :end ) where /q npm @@ -31,52 +30,56 @@ IF ERRORLEVEL 1 ( ECHO 'Error: npm is not installed.' >&2 ECHO Please install npm from: https://nodejs.org/en/download/ ECHO And make sure its in the path - GOTO :endrpc + GOTO :end ) echo Dependencies are already Installed ECHO. echo Creating organization directory ECHO. -CD ..\..\..\ -MKDIR fosscord-workspace -cd fosscord-workspace +MKDIR fosscord +cd fosscord ECHO Cloning all repositories ECHO. git clone https://github.com/fosscord/fosscord overview git clone https://github.com/fosscord/fosscord-api api git clone https://github.com/fosscord/fosscord-gateway gateway +git clone https://github.com/fosscord/fosscord-themes themes +git clone https://github.com/fosscord/fosscord-plugins plugins +git clone https://github.com/fosscord/fosscord-gateway gateway git clone https://github.com/fosscord/fosscord-voice voice git clone https://github.com/fosscord/fosscord-server-util server-util git clone https://github.com/fosscord/fosscord-cdn cdn -git clone https://github.com/fosscord/fosscord-css design +git clone https://github.com/fosscord/fosscord-ui ui git clone https://github.com/fosscord/fosscord-client client git clone https://github.com/fosscord/fosscord-dashboard dashboard +git clone https://github.com/fosscord/fosscord-landingpage landingpage +git clone https://github.com/fosscord/css-mediaquery css-mediaquery +git clone https://github.com/fosscord/react-native-withcss react-native-withcss + +echo {"folders":[{"path":"overview"},{"path":"cdn"},{"path":"api"},{"path":"gateway"},{"path":"voice"},{"path":"server-util"},{"path":"ui"},{"path":"client"},{"path":"plugins"},{"path":"themes"},{"path":"landingpage"},{"path":"dashboard"},{"path":"css-mediaquery"},{"path":"react-native-withcss"}]}> fosscord.code-workspace where /q code IF ERRORLEVEL 0 ( -CALL echo {"folders":[{"path":"overview"},{"path":"cdn"},{"path":"api"},{"path":"gateway"},{"path":"voice"},{"path":"server-util"},{"path":"design"},{"path":"client"},"path":"dashboard"}]}> fosscord.code-workspace -CALL ECHO Opening VSCode Workspace -CALL code discord-open-source.code-workspace + ECHO Opening VSCode Workspace + code fosscord.code-workspace ) -:END1 CHOICE /c yn /m "Do you want to install the Discord Rich Presence?" -IF %ERRORLEVEL% == 2 GOTO :endrpc +IF %ERRORLEVEL% == 2 GOTO :end cd .. cd rpc -CALL npm install +npm install -CALL npm i pm2 -g - CALL pm2 start --name rpc index.js - -CALL pm2 save -CALL pm2-startup install -:endrpc +npm i pm2 -g +pm2 start --name rpc index.js +pm2 save +pm2-startup install :end + ECHO finished installation @ECHO on -PAUSE \ No newline at end of file +PAUSE