2025-12-23 10:56:22 +11:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
if [ -p "/usr/local/bin" ]; then
|
|
|
|
|
echo "Your path is missing /usr/local/bin, you might want to add it. Type the following"
|
|
|
|
|
echo "\$PATH=/usr/local/bin:$PATH"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Note: This script requires sudo access."
|
|
|
|
|
# Check for required commands
|
|
|
|
|
if ! command -v git 2>&1 >/dev/null
|
|
|
|
|
then
|
|
|
|
|
echo "Git is not installed on your system. Install it with your package manager (or on macOS use xcode-select)"
|
|
|
|
|
exit 0;
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if ! command -v c++ 2>&1 >/dev/null
|
|
|
|
|
then
|
|
|
|
|
echo "A compiler linked to `c++` is not installed on your system. Install it with your package manager (or on macOS use xcode-select)"
|
|
|
|
|
exit 0;
|
|
|
|
|
fi
|
|
|
|
|
|
2026-01-18 14:19:43 +11:00
|
|
|
if ! command -v make 2>&1 >/dev/null
|
2025-12-23 10:56:22 +11:00
|
|
|
then
|
2026-01-18 14:19:43 +11:00
|
|
|
echo "make is not installed on your system. Install it with your package manager (or on macOS use xcode-select)"
|
2025-12-23 10:56:22 +11:00
|
|
|
exit 0;
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Check if Ground is installed
|
|
|
|
|
if ! command -v ground 2>&1 >/dev/null
|
|
|
|
|
then
|
|
|
|
|
read -p "Ground has not been installed on your system. Ground is the runtime VM for Solstice. Would you like to install it? (y/n) " consent
|
|
|
|
|
if [ "$consent" != "y" ]
|
|
|
|
|
then
|
|
|
|
|
echo "Exiting..."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Installing Ground..."
|
|
|
|
|
mkdir -p ~/.local/share/solstice-installer
|
|
|
|
|
cd ~/.local/share/solstice-installer
|
|
|
|
|
git clone https://chookspace.com/ground/cground
|
|
|
|
|
cd cground
|
|
|
|
|
make both
|
|
|
|
|
sudo make install
|
|
|
|
|
echo "Success!"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Check if Solstice is installed
|
|
|
|
|
if ! command -v solstice 2>&1 >/dev/null
|
|
|
|
|
then
|
|
|
|
|
read -p "Solstice has not been installed on your system, would you like to install it? (y/n) " consent
|
|
|
|
|
if [ "$consent" != "y" ]
|
|
|
|
|
then
|
|
|
|
|
echo "Exiting..."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Installing Solstice..."
|
|
|
|
|
mkdir -p ~/.local/share/solstice-installer
|
|
|
|
|
cd ~/.local/share/solstice-installer
|
|
|
|
|
git clone https://chookspace.com/max/solstice
|
|
|
|
|
cd solstice
|
|
|
|
|
make
|
|
|
|
|
sudo mkdir -p /usr/local/bin
|
|
|
|
|
sudo cp solstice /usr/local/bin/solstice
|
|
|
|
|
echo "Success!"
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Solstice is already installed, updating...";
|
|
|
|
|
cd ~/.local/share/solstice-installer/solstice
|
|
|
|
|
git pull --dry-run
|
|
|
|
|
cd ..
|
|
|
|
|
cd cground
|
|
|
|
|
git pull --dry-run
|
|
|
|
|
read -p "Do these changes look okay? If it says 'already up to date', type 'n' (y/n) " consent
|
|
|
|
|
if [ "$consent" != "y" ]
|
|
|
|
|
then
|
|
|
|
|
echo "Exiting..."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
echo "Updating Ground..."
|
|
|
|
|
git pull
|
2026-01-19 20:04:36 +11:00
|
|
|
make clean
|
|
|
|
|
make both
|
2025-12-23 10:56:22 +11:00
|
|
|
sudo make install
|
|
|
|
|
cd ..
|
|
|
|
|
echo "Updating Solstice..."
|
|
|
|
|
cd solstice
|
|
|
|
|
git pull
|
2026-01-19 20:04:36 +11:00
|
|
|
make clean
|
2025-12-23 10:56:22 +11:00
|
|
|
make
|
|
|
|
|
sudo cp solstice /usr/local/bin/solstice
|