73 lines
2.8 KiB
Bash
Raw Normal View History

2021-04-29 10:16:52 +08:00
#!/bin/sh
cat << EOF
--------------------------------------
2021-05-01 16:10:57 +02:00
Fosscord Open Source Contribution Setup
2021-04-29 10:16:52 +08:00
strg+c/strg+d to exit
-------------------------------------------
This will clone and setup all repositories,
if you only want to work on one specific repository
follow their specific Getting Started Guide and exit this script
----------------------------------------------------------------
EOF
2021-05-01 17:56:39 +02:00
printf "Are you sure you want to continue (y/N)?"
2021-02-04 11:02:07 +01:00
read -p "" CONT
if [ "$CONT" != "y" ]; then
echo Aborting setup
exit 1
fi
echo ---------------------
echo Checking dependencies
if ! [ -x "$(command -v git)" ]; then
2021-02-04 16:26:04 +01:00
echo Error: git is not installed.
2021-02-04 11:02:07 +01:00
echo Please Install git from: https://git-scm.com/downloads
echo And make sure its in the path
exit 1
fi
if ! [ -x "$(command -v node)" ]; then
2021-02-04 16:26:04 +01:00
echo Error: node is not installed.
2021-05-01 16:26:50 +02:00
echo Please Install NodeJS from: https://nodejs.org/en/download
2021-02-04 11:02:07 +01:00
echo And make sure its in the path
exit 1
fi
2021-05-01 16:41:36 +02:00
if ! [ -x "$(command -v npm)" ]; then
2021-02-04 11:02:07 +01:00
echo 'Error: npm is not installed.' >&2
2021-05-01 16:26:50 +02:00
echo Please install npm from: https://nodejs.org/en/download
2021-02-04 11:02:07 +01:00
echo And make sure its in the path
exit 1
fi
2021-05-01 16:10:57 +02:00
echo ✓ Dependencies are already installed
2021-02-04 11:02:07 +01:00
echo -------------------------------
echo Creating organization directory
mkdir fosscord
cd fosscord
2021-02-04 11:02:07 +01:00
echo Cloning all repositories
2021-02-04 16:26:04 +01:00
2021-04-23 21:54:40 +02:00
git clone https://github.com/fosscord/fosscord overview
git clone https://github.com/fosscord/fosscord-api api
2021-04-23 21:54:40 +02:00
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
2021-04-24 20:06:24 +02:00
git clone https://github.com/fosscord/fosscord-media media
2021-04-23 21:54:40 +02:00
git clone https://github.com/fosscord/fosscord-server-util server-util
git clone https://github.com/fosscord/fosscord-cdn cdn
2021-04-23 21:54:40 +02:00
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
2021-04-24 20:06:24 +02:00
git clone https://github.com/fosscord/fosscord-support support
2021-04-23 21:54:40 +02:00
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
2021-04-24 20:06:24 +02:00
echo '{"folders":[{"path":"overview"},{"path":"cdn"},{"path":"api"},{"path":"gateway"},{"path":"media"},{"path":"server-util"},{"path":"ui"},{"path":"client"},{"path":"plugins"},{"path":"themes"},{"path":"landingpage"},{"path":"dashboard"},{"path":"support"},{"path":"css-mediaquery"},{"path":"react-native-withcss"}]}' >> fosscord.code-workspace
2021-05-01 16:26:50 +02:00
2021-05-01 17:04:33 +02:00
echo "Do you want to launch VS Code workspace?"
select yn in "y" "n"; do
case $yn in
Yes ) echo Opening VS Code Workspace ; code fosscord.code-workspace ; break;;
No ) break;;
esac
done
2021-05-01 16:41:36 +02:00
echo Installation finished