mirror of
https://github.com/spacebarchat/spacebarchat.git
synced 2024-11-25 11:52:56 +01:00
🎨 improve setup script
This commit is contained in:
parent
e876659b4b
commit
c68caa940d
@ -4,37 +4,64 @@ ECHO Discord-Open-Source-Installer
|
|||||||
ECHO v0.1 ~xnacly
|
ECHO v0.1 ~xnacly
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO str+c/str+d to exit
|
ECHO str+c/str+d to exit
|
||||||
ECHO 1: /discord-dashboard.git
|
|
||||||
ECHO 2: /discord-api.git
|
|
||||||
ECHO 3: /discord-cdn.git
|
|
||||||
ECHO 4: /discord-client.git
|
|
||||||
ECHO 5: /discord-react-native.git
|
|
||||||
ECHO 6: /discord-react.git
|
|
||||||
ECHO 7: /discord-css.git
|
|
||||||
ECHO 8: /discord-gateway.git
|
|
||||||
ECHO A: all of the above
|
|
||||||
ECHO.
|
ECHO.
|
||||||
CHOICE /c 1234567a /m "decide what repos to install"
|
ECHO This will clone and setup all repositories,
|
||||||
|
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 :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 :end
|
||||||
|
)
|
||||||
|
|
||||||
IF %ERRORLEVEL% ==A GOTO ALL
|
where /q node
|
||||||
::IF ERRORLEVEL ==1
|
IF ERRORLEVEL 1 (
|
||||||
::IF ERRORLEVEL ==2
|
ECHO Error: node is not installed.
|
||||||
::IF ERRORLEVEL ==3
|
ECHO Please Install NodeJS from: https://nodejs.org/en/download/
|
||||||
::IF ERRORLEVEL ==4
|
ECHO And make sure its in the path
|
||||||
::IF ERRORLEVEL ==5
|
GOTO :end
|
||||||
::IF ERRORLEVEL ==6
|
)
|
||||||
::IF ERRORLEVEL ==7
|
|
||||||
|
|
||||||
:ALL
|
where /q npm
|
||||||
cd ..
|
IF ERRORLEVEL 1 (
|
||||||
mkdir discord-open-source-repos
|
ECHO 'Error: npm is not installed.' >&2
|
||||||
cd discord-open-source-repos
|
ECHO Please install npm from: https://nodejs.org/en/download/
|
||||||
git clone https://github.com/discord-open-source/discord-dashboard.git
|
ECHO And make sure its in the path
|
||||||
git clone https://github.com/discord-open-source/discord-api.git
|
GOTO :end
|
||||||
git clone https://github.com/discord-open-source/discord-gateway.git
|
)
|
||||||
git clone https://github.com/discord-open-source/discord-cdn.git
|
echo Dependencies are already Installed
|
||||||
git clone https://github.com/discord-open-source/discord-client.git
|
ECHO.
|
||||||
git clone https://github.com/discord-open-source/discord-react-native.git
|
echo Creating organization directory
|
||||||
git clone https://github.com/discord-open-source/discord-react.git
|
ECHO.
|
||||||
git clone https://github.com/discord-open-source/discord-css.git
|
CD ..\..\
|
||||||
|
MKDIR discord-open-source-workspace
|
||||||
|
cd discord-open-source-workspace
|
||||||
|
ECHO Cloning all repositories
|
||||||
|
ECHO.
|
||||||
|
git clone https://github.com/discord-open-source/discord-api api
|
||||||
|
git clone https://github.com/discord-open-source/discord-gateway gateway
|
||||||
|
git clone https://github.com/discord-open-source/discord-voice voice
|
||||||
|
git clone https://github.com/discord-open-source/discord-cdn cdn
|
||||||
|
git clone https://github.com/discord-open-source/discord-css design
|
||||||
|
git clone https://github.com/discord-open-source/discord-client client
|
||||||
|
git clone https://github.com/discord-open-source/discord-react react
|
||||||
|
git clone https://github.com/discord-open-source/discord-react-native react-native
|
||||||
|
git clone https://github.com/discord-open-source/discord-dashboard dashboard
|
||||||
|
|
||||||
|
where /q code
|
||||||
|
IF ERRORLEVEL 0 (
|
||||||
|
echo {"folders":[{"path":"cdn"},{"path":"api"},{"path":"gateway"},{"path":"voice"},{"path":"design"},{"path":"react"},{"path":"client"},{"path":"react-native"},{"path":"dashboard"}]}> discord-open-source.code-workspace
|
||||||
|
|
||||||
|
ECHO Opening VSCode Workspace
|
||||||
|
code discord-open-source.code-workspace
|
||||||
|
)
|
||||||
|
|
||||||
|
:end
|
||||||
|
@ECHO on
|
||||||
|
PAUSE
|
||||||
|
@ -15,13 +15,13 @@ fi
|
|||||||
echo ---------------------
|
echo ---------------------
|
||||||
echo Checking dependencies
|
echo Checking dependencies
|
||||||
if ! [ -x "$(command -v git)" ]; then
|
if ! [ -x "$(command -v git)" ]; then
|
||||||
echo 'Error: git is not installed.' >&2
|
echo Error: git is not installed.
|
||||||
echo Please Install git from: https://git-scm.com/downloads
|
echo Please Install git from: https://git-scm.com/downloads
|
||||||
echo And make sure its in the path
|
echo And make sure its in the path
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if ! [ -x "$(command -v node)" ]; then
|
if ! [ -x "$(command -v node)" ]; then
|
||||||
echo 'Error: node is not installed.' >&2
|
echo Error: node is not installed.
|
||||||
echo Please Install NodeJS from: https://nodejs.org/en/download/
|
echo Please Install NodeJS from: https://nodejs.org/en/download/
|
||||||
echo And make sure its in the path
|
echo And make sure its in the path
|
||||||
exit 1
|
exit 1
|
||||||
@ -32,7 +32,7 @@ if ! [ -x "$(command -v npm)" ]; then
|
|||||||
echo And make sure its in the path
|
echo And make sure its in the path
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo ✓ All Dependencies Installed
|
echo ✓ Dependencies are already Installed
|
||||||
echo -------------------------------
|
echo -------------------------------
|
||||||
echo Creating organization directory
|
echo Creating organization directory
|
||||||
cd ../../
|
cd ../../
|
||||||
@ -41,6 +41,7 @@ mkdir discord-open-source
|
|||||||
mv overview discord-open-source/
|
mv overview discord-open-source/
|
||||||
cd discord-open-source
|
cd discord-open-source
|
||||||
echo Cloning all repositories
|
echo Cloning all repositories
|
||||||
|
|
||||||
git clone https://github.com/discord-open-source/discord-api api
|
git clone https://github.com/discord-open-source/discord-api api
|
||||||
git clone https://github.com/discord-open-source/discord-gateway gateway
|
git clone https://github.com/discord-open-source/discord-gateway gateway
|
||||||
git clone https://github.com/discord-open-source/discord-voice voice
|
git clone https://github.com/discord-open-source/discord-voice voice
|
||||||
@ -50,6 +51,7 @@ git clone https://github.com/discord-open-source/discord-client client
|
|||||||
git clone https://github.com/discord-open-source/discord-react react
|
git clone https://github.com/discord-open-source/discord-react react
|
||||||
git clone https://github.com/discord-open-source/discord-react-native react-native
|
git clone https://github.com/discord-open-source/discord-react-native react-native
|
||||||
git clone https://github.com/discord-open-source/discord-dashboard dashboard
|
git clone https://github.com/discord-open-source/discord-dashboard dashboard
|
||||||
|
|
||||||
if [ -x "$(command -v code)" ]; then
|
if [ -x "$(command -v code)" ]; then
|
||||||
echo '{"folders":[{"path":"overview"},{"path":"cdn"},{"path":"api"},{"path":"gateway"},{"path":"voice"},{"path":"design"},{"path":"react"},{"path":"client"},{"path":"react-native"},{"path":"dashboard"}]}' >> discord-open-source.code-workspace
|
echo '{"folders":[{"path":"overview"},{"path":"cdn"},{"path":"api"},{"path":"gateway"},{"path":"voice"},{"path":"design"},{"path":"react"},{"path":"client"},{"path":"react-native"},{"path":"dashboard"}]}' >> discord-open-source.code-workspace
|
||||||
echo Open VSCode Workspace
|
echo Open VSCode Workspace
|
||||||
|
Loading…
Reference in New Issue
Block a user