1
0
mirror of https://github.com/spacebarchat/spacebarchat.git synced 2024-11-12 13:42:46 +01:00
spacebarchat/scripts/setup/setup.sh
xnacly 78c87060d0 updated the setup script
- now allows for easier addition of new repos via a python script
- split setup.sh to setup.py & clone_all_repos.sh to make dynamic addition of all repos with the github api easier
- vscode workspace now gets generated from all repos in the orga
2021-07-20 11:37:29 +02:00

60 lines
1.7 KiB
Bash
Executable File

#!/bin/sh
cat fosscord.txt
echo
cat << EOF
--------------------------------------
Fosscord Open Source Contribution Setup
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
printf "Are you sure you want to continue (y/N)?"
read -p "" CONT
if [ "$CONT" != "y" ]; then
echo Aborting setup
exit 1
fi
echo ---------------------
echo Checking dependencies
if ! [ -x "$(command -v git)" ]; then
echo Error: git is not installed.
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
echo Error: node is not installed.
echo Please Install NodeJS from: https://nodejs.org/en/download
echo And make sure its in the path
exit 1
fi
if ! [ -x "$(command -v npm)" ]; then
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
exit 1
fi
echo ✓ Dependencies are already installed
echo -------------------------------
echo Creating organization directory
mkdir fosscord
cd fosscord
echo Cloning all repositories
sh ../clone_all_repos.sh
mv ../fosscord.code-workspace ./fosscord.code-workspace
while true; do
echo "Do you wish to launch the VSCode workspace?"
read -p "[y/n]: " yn
case $yn in
[Yy]* ) echo Opening VS Code Workspace ; code fosscord.code-workspace ; break;;
[Nn]* ) break;;
esac
done
echo Installation finished